On 1/20/07, Zoran Vasiljevic <[EMAIL PROTECTED]> wrote:
Am 19.01.2007 um 17:38 schrieb Stephen Deasey: > For Tcl, add a new switch to ns_cache_create, -expireflush (or > whatever). Keep the -expire and -expireflush times distinct. Tcl > caches live forever IIRC so that's all there is to it, no need to > handle unregistering the scheduled proc. > Why not just ns_cache_flush ?-expired? cache Programmer may invoke that anytime it wishes. Actually, only the Tcl wrapper needs to be done that will step each entry from the cache but not return any values. The cache code will take care to expire old items as it walks the cache.
Even better. By adding the flag to the ns_cache_create command I was trying to bias the Tcl side towards easy and the C side towards flexibility. But the above is easy enough and it looks cleaner.