019407th since April 04, 2007
Xicheng's web log
----- a place to make mistakes and learn from scratch
Feb 1, 2008 ( Friday )
( 296 )
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.
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. :-)
my $cache = myweb_get_cached_obj_from_memory();
$cache->remove('_cached_monthly_archive');
$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 a comment:
Read the Guidance for the first time users
Need browser cookie to submit properly
[ Previous Page ] | [ Blog Main ]
Monthly archives
Site Statistics
Newest comments
My links
Add new links
Advanced Search
Blog
