Posted At : May 07, 2008 16:24 PM
| Posted By : Ed Tabara
Related Categories:
ColdFusion,
My Projects,
Other,
Caching,
1ssBlog
"Smart Caching" is my try to make the caching process a little bit more inteligent and i've made it on the example of 1ssBlog. It allow the entries to be cached and de-cached automatically based on how often they are viewed.
How it work:
We set the period of time (1 day, 1 hour or 1 minute) and the number of unique views that should happen in that period of time in order the entry to get cached automatically.
So, if we set the period to 1 hour and the number of views to 30, then as soon as an entry will be viewd 30 times in a period of the specified length, the entry will get cached. But if after some time the entry will not get enough views in a period of specified length, the entry will de removed from the cache automaticaly.
Nice and easy, huh? But it make the caching process flexible.
I would like to hear of others think about it....
| 7830 Views
| 9% / 0% Popularity
Posted At : Mar 21, 2008 19:31 PM
| Posted By : Ed Tabara
Related Categories:
ColdFusion,
My Projects,
Caching,
1ssBlog
The Triggers here are a way to have some pods re-cached automatically when an event happen. Right now it can be done for 2 events:
Add/Delete/Approve Comment
Delete entry or entry become live
Have a nice weekend everyone!
...
| 7278 Views
| 8% / 0% Popularity
Posted At : Mar 20, 2008 17:47 PM
| Posted By : Ed Tabara
Related Categories:
ColdFusion,
My Projects,
Caching,
1ssBlog
At this moment there are 6 different options for cache refresh in 1ssBlog:
Refresh App Cache - will refresh the entire application. Pretty much it would be like if it would be the first run after ColdFusion restart.
Refresh Posts Cache - this will refresh only the posts. So, when you add a new entry, this would be the choice.
Refresh Pods Cache - will refresh only the pods. For example it would be helpfull when a new pod is added or some settings of current pods are changed.
Refresh Bad Words Cache - as said, will refresh the Bad Words set on the Settings page.
Refresh Bad IP Cache - will refresh the Bad IPs set on the Settings page.
Refresh Smiles Cache - if you add, delete or update some smiles images, this will be the one to go.
If anyone think any other cache refreshing options are needed, let me know....
| 8864 Views
| 10% / 0% Popularity
Posted At : Mar 14, 2008 21:40 PM
| Posted By : Ed Tabara
Related Categories:
ColdFusion,
My Projects,
Caching,
1ssBlog
One of the things i like in 1ssBlog is the option to use pretty much any caching mechanism you want. Because this was one of the main ideas behind the whole thing, it was done from the start. So, what you will have to do in order to use a new caching mechanism with you 1ssBlog instance, is to make sure it have the following methods:
cacheInit - will initialize your caching mechanism.
cacheSetElement - will set an elemnt to the given value.
cacheGetElement - will return the value of the requested cached element.
cacheRemoveElement - will remove from the cache the given element.
cacheShutdown - will delete all your cached elements.
If any of the above functions are not needed, just make them empty.
The CFC for your caching mechanism should be placed into the com/caching folder and then the right location set in the Settings page of your admin backoffice. And finally use the "Refresh App Cache" lick to reload your application with cache and every...
| 7734 Views
| 9% / 1% Popularity
Posted At : Dec 18, 2007 11:04 AM
| Posted By : Ed Tabara
Related Categories:
ColdFusion,
Caching
After Jon Hirschi yesterday's post on caching in ColdFusion with memcached, i searched for a windows version of memcached server and i did find it.
So, if anyone interested, you can get it here
...
| 6359 Views
| 7% / 0% Popularity
Posted At : Dec 18, 2007 1:49 AM
| Posted By : Ed Tabara
Related Categories:
ColdFusion,
Caching
Jon Hirschi have done an awesome job on external caching for coldfusion with memcached....
| 6366 Views
| 7% / 0% Popularity
Posted At : Oct 07, 2007 22:52 PM
| Posted By : Ed Tabara
Related Categories:
ColdFusion,
Caching
Ok. Seems like i've got it working.
First i tried this
in Application.cfm and it helped. BUT as result the pages were loading over 2 seconds each time. and of course it was not acceptable
So, i went from Rob Wilkerson's idea of substituting a part of the cached version of the entire page with the needed part. But the problem is that theoretically it's not known what exactly and with what exactly should be changed (because of the dynamic nature of what should be changed and/or because i wanted to make it generalized enough).
So i had to find or have some kind of markers that will allow uniquily identify the needed parts of the source html. And this is not difficult. This way i came to the following process:
1. Inside the pod script, around the code that will be output on the blog, i place a tag that does not really exists. In order to make it simple, i decided to use as so the name given to the pod. So, the pod's script will look something like this:
....
here goe...
| 8322 Views
| 10% / 0% Popularity