From 92289e59f75f227f2f4510c01ec58073c2c9b0cf Mon Sep 17 00:00:00 2001 From: Mark Story Date: Sun, 18 Apr 2010 00:57:52 -0400 Subject: [PATCH] Updating ApcEngine so it implements the missing method in the abstract class.. --- cake/libs/cache/apc.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/cake/libs/cache/apc.php b/cake/libs/cache/apc.php index 2fbf08ab3..9a1586a4c 100644 --- a/cake/libs/cache/apc.php +++ b/cake/libs/cache/apc.php @@ -50,7 +50,7 @@ class ApcEngine extends CacheEngine { * @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 @@ class ApcEngine extends CacheEngine { * * @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.')); + } } ?> \ No newline at end of file