PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Caching » Cache_Lite » Bug #4957

null data on save method

Details

Submitted2005-08-01 01:58 UTC
Fromkarlus at karlus dot net
StatusBogus
PackageCache_Lite
PHP Version4.4.1
OSLinux
Roadmaps(Not assigned)

Comments

[2005-08-01 01:58 UTC] karlus at karlus dot net

Description:
------------
If the data you're trying to 'cache' is 0 the get method will not function. The save method will create the cache file put the get method will fail to load the cache.

Test script:
---------------
$cache = new Cache_Lite($cacheOptions);

if ($data = $cache->get('cacheId')) {
print "cache";
} else {
print "live";
$items = "0";
print $cache->save($items, 'cacheId');
}
?>

Expected result:
----------------
I would expecto to see 'live' in the first run and 'cache' in the second... i allways see 'live'.