mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Updating ApcEngine so it implements the missing method in the abstract class..
This commit is contained in:
parent
8ea4475ac3
commit
92289e59f7
1 changed files with 12 additions and 2 deletions
14
cake/libs/cache/apc.php
vendored
14
cake/libs/cache/apc.php
vendored
|
@ -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.'));
|
||||
}
|
||||
}
|
||||
?>
|
Loading…
Reference in a new issue