XCachePlugin returns false value for cache miss

This commit is contained in:
Evan Prodromou 2010-01-04 10:12:19 -10:00
parent 06b6a27d7d
commit 96480aa6c1

View File

@ -63,8 +63,10 @@ class XCachePlugin extends Plugin
function onStartCacheGet(&$key, &$value) function onStartCacheGet(&$key, &$value)
{ {
$value = xcache_get($key); if (!xcache_isset($key)) {
if (!is_null($value)) { $value = false;
} else {
$value = xcache_get($key);
$value = unserialize($value); $value = unserialize($value);
} }
Event::handle('EndCacheGet', array($key, &$value)); Event::handle('EndCacheGet', array($key, &$value));