"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.
Posted At : May 07, 2008 16:24 PM
| Posted By : Ed Tabara
Related Categories: ColdFusion, My Projects, Other, Caching, 1ssBlog
Related Categories: ColdFusion, My Projects, Other, Caching, 1ssBlog
| 7881 Views
| 9% / 0% Popularity
Right now, when the application just start are cached 3 types of entries:
1) last X entries;
2) Y entries with highest number of views;
3) the entries that are set as to be cached till a particular date.
Then based on the number of views and your setting new entries will be added to the list and some will disappear from there (with the exception of the X entries from point 1 that will not be de-cached even on low views number).