Bug #6290 [NEW]: non-specific automaticCleaningFactor

From: Date: Mon, 19 Dec 2005 17:29:33 +0000
Subject: Bug #6290 [NEW]: non-specific automaticCleaningFactor
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-7362@lists.php.net to get a copy of this message
From: kenrick at thebusypixel dot com Operating system: linux PHP version: 4.3.11 Package: Documentation Bug Type: Bug Bug description: non-specific automaticCleaningFactor Description: ------------ ver 1.62 of Cache_Lite, but this is present I think in most versions. automaticCleaningFactor - this is not immediatley apparent that it pertains to ALL created cache files. If this is specified in multiple instances of Cache_Lite, you will find your caches randomly cleaned, because it just wipes out all files, not just the file you are specifically caching. Im not sure if this is the desired behavoir, but I had to find out that this is what it does the hard way. Test script: --------------- require_once('Cache/Lite.php'); $id = 'articles/index'; $options = array( 'cacheDir'=>CACHE_PATH, 'lifeTime'=>3600, 'automaticCleaningFactor'=>20 ); $Cache_Lite = new Cache_Lite($options); if ( $page = $Cache_Lite->get($id) ) { return $page; } else { $page = 'some data'; $Cache_Lite->save($page); return $page } Expected result: ---------------- I expect that Cache Lite would ONLY clean the requested cache, but instead it cleans all in the CACHE_PATH dir Actual result: -------------- haha no files. ;) -- Edit bug report at http://pear.php.net/bugs/bug.php?id=6290&edit=1 --

« previous php.pear.doc (#7362) next »