[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pear-doc
Subject:    [PEAR-DOC] [PEAR-BUG] Bug #6290 [NEW]: non-specific automaticCleaningFactor
From:       "kenrick at thebusypixel dot com" <pear-doc () lists ! php ! net>
Date:       2005-12-19 17:29:33
Message-ID: bug-6290 () pear ! php ! net
[Download RAW message or body]

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
-- 

-- 
PEAR Documentation List Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic