mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Merge branch 'master' into 2.6
This commit is contained in:
commit
6bacc5bb46
2 changed files with 14 additions and 4 deletions
|
@ -125,10 +125,17 @@ class ApcEngine extends CacheEngine {
|
||||||
if ($check) {
|
if ($check) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
$info = apc_cache_info('user');
|
if (class_exists('APCIterator', false)) {
|
||||||
$cacheKeys = $info['cache_list'];
|
$iterator = new APCIterator(
|
||||||
unset($info);
|
'user',
|
||||||
foreach ($cacheKeys as $key) {
|
'/^' . preg_quote($this->settings['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->settings['prefix']) === 0) {
|
||||||
apc_delete($key['info']);
|
apc_delete($key['info']);
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,6 +81,9 @@ class ShellDispatcher {
|
||||||
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
|
if (!defined('CAKE_CORE_INCLUDE_PATH')) {
|
||||||
define('CAKE_CORE_INCLUDE_PATH', dirname(dirname(dirname(__FILE__))));
|
define('CAKE_CORE_INCLUDE_PATH', dirname(dirname(dirname(__FILE__))));
|
||||||
define('CAKEPHP_SHELL', true);
|
define('CAKEPHP_SHELL', true);
|
||||||
|
if (!defined('DS')) {
|
||||||
|
define('DS', DIRECTORY_SEPARATOR);
|
||||||
|
}
|
||||||
if (!defined('CORE_PATH')) {
|
if (!defined('CORE_PATH')) {
|
||||||
define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
|
define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue