Skip to content
Permalink
Browse files

Fix APC related errors.

  • Loading branch information...
markstory committed Jul 2, 2014
1 parent bf45ba3 commit 1b8f9dac9cfa900b293c1f2ec66f8b282fa3bedc
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/Cache/Engine/ApcEngine.php
@@ -16,6 +16,7 @@
use Cake\Cache\CacheEngine;
use Cake\Utility\Inflector;
use APCIterator;
/**
* APC storage engine for cache
@@ -135,15 +136,15 @@ public function clear($check) {
if (class_exists('APCIterator', false)) {
$iterator = new APCIterator(
'user',
'/^' . preg_quote($this->settings['prefix'], '/') . '/',
'/^' . preg_quote($this->_config['prefix'], '/') . '/',
APC_ITER_NONE
);
apc_delete($iterator);
return true;
}
$cache = apc_cache_info('user');
foreach ($cache['cache_list'] as $key) {
if (strpos($key['info'], $this->settings['prefix']) === 0) {
if (strpos($key['info'], $this->_config['prefix']) === 0) {
apc_delete($key['info']);
}
}

0 comments on commit 1b8f9da

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