cache_lite cleanup problem

From: Date: Tue, 23 May 2006 18:21:46 +0000
Subject: cache_lite cleanup problem
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-24133@lists.php.net to get a copy of this message
I'm struggling to figure out what I'm doing wrong as it appears for some reason my lifeTime option is not working properly. I am testing on a Windows XP box running PHP 5.0.4 and running cache_lite version 1.7.1 All I want to do is create a save a cache file, and then after 10 seconds, the cache file goes away. However, in this example I am posting, my cache file never goes away (although it does get saved and accessed properly). My understanding was that on the "get" function it would cleanup the cache file if it had passed its expiration. Anyone know what I'm doing wrong here? //----------- require_once "Cache/Lite.php"; $options = array( 'cacheDir' => "c:/temp/results/", 'lifeTime' => 10, 'pearErrorMode' => CACHE_LITE_ERROR_DIE, 'automaticSerialization' => TRUE, 'automaticCleaningFactor' => 2 ); $cache = new Cache_Lite($options); //Save the cache if (isset($_REQUEST["save"])) { $cache->save("hi", "CACHEABC", "GROUP123"); print "Saved"."<br>"; return; } //Print out cache if ( $cacheData = $cache->get("CACHEABC", "GROUP123") ) { print "Cache Hit: ".$cacheData."<br>"; } else { print "Cache Miss"."<br>"; }

« previous php.pear.general (#24133) next »