if (Event::handle('StartCacheGet', array(&$key, &$value))) {
if (array_key_exists($key, $this->_items)) {
- common_log(LOG_INFO, 'Cache HIT for key ' . $key);
$value = $this->_items[$key];
- } else {
- common_log(LOG_INFO, 'Cache MISS for key ' . $key);
}
Event::handle('EndCacheGet', array($key, &$value));
}
if (Event::handle('StartCacheSet', array(&$key, &$value, &$flag,
&$expiry, &$success))) {
- common_log(LOG_INFO, 'Setting cache value for key ' . $key);
$this->_items[$key] = $value;
if (Event::handle('StartCacheDelete', array(&$key, &$success))) {
if (array_key_exists($key, $this->_items[$key])) {
- common_log(LOG_INFO, 'Deleting cache value for key ' . $key);
unset($this->_items[$key]);
}
$success = true;