function onStartCacheGet(&$key, &$value)
{
- $value = xcache_get($key);
- if (!is_null($value)) {
+ if (!xcache_isset($key)) {
+ $value = false;
+ } else {
+ $value = xcache_get($key);
$value = unserialize($value);
}
Event::handle('EndCacheGet', array($key, &$value));
Event::handle('EndCacheDelete', array($key));
return false;
}
+
+ function onPluginVersion(&$versions)
+ {
+ $versions[] = array('name' => 'XCache',
+ 'version' => STATUSNET_VERSION,
+ 'author' => 'Craig Andrews',
+ 'homepage' => 'http://status.net/wiki/Plugin:XCache',
+ 'rawdescription' =>
+ _m('Use the <a href="http://xcache.lighttpd.net/">XCache</a> variable cache to cache query results.'));
+ return true;
+ }
}