Skip to content
Permalink
Browse files

Updating ApcEngine so it implements the missing method in the abstrac…

…t class..
  • Loading branch information...
markstory committed Apr 18, 2010
1 parent 8ea4475 commit 92289e59f75f227f2f4510c01ec58073c2c9b0cf
Showing with 12 additions and 2 deletions.
  1. +12 −2 cake/libs/cache/apc.php
@@ -50,7 +50,7 @@ public function init($settings = array()) {
* @param integer $duration How long to cache the data, in seconds
* @return boolean True if the data was succesfully cached, false on failure
*/
public function write($key, &$value, $duration) {
public function write($key, $value, $duration) {
$expires = time() + $duration;
apc_store($key.'_expires', $expires, $duration);
return apc_store($key, $value, $duration);
@@ -110,8 +110,18 @@ public function delete($key) {
*
* @return boolean True if the cache was succesfully cleared, false otherwise
*/
public function clear() {
public function clear($check) {
return apc_clear_cache('user');
}
/**
* Garbage collection not implemented in APC
*
* @return void
* @throws BadMethodCallException
*/
public function gc() {
throw new BadMethodCallException(__('Cannot gc() with APC.'));
}
}
?>

0 comments on commit 92289e5

Please sign in to comment.
You can’t perform that action at this time.