Blog
016820th since April 04, 2007
R
1 - 1 of totally 1 entry in Feb, 2008 found
Feb 1, 2008 ( Friday )
( 273 )
Auto rotation for "Monthly archives"
Records in Monthly archives box of the right-hand-side toolboxes are influenced only by the "Insert" and "Delete" operations of blog entries. currently the result are saved in the MemoryCache, to update the results and make it rotate automatically, only two lines of code are needed.

my $cache = myweb_get_cached_obj_from_memory();
$cache->remove('_cached_monthly_archive');

huh, so simple. I used to update these at some specific time on the first day of each month which is stupid and often get me '0' record for a specific time period.. :-(

Sometimes we have to learn thinking from the other way around. :-)
Add tags: Cache

by xicheng
03:29:21 | Add a comment | Modify entry | Ask xicheng