Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit 182fd15

Browse files
committed
Fix to #1157: adding support for apcu
1 parent c653dd7 commit 182fd15

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

core/src/plugins/cache.doctrine/class.DoctrineCacheDriver.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
require __DIR__ . "/doctrine/vendor/autoload.php";
2525

26-
define('APC_EXTENSION_LOADED', extension_loaded('apc'));
26+
define('APC_EXTENSION_LOADED', extension_loaded('apc') || extension_loaded('apcu'));
2727
define('MEMCACHE_EXTENSION_LOADED', extension_loaded('memcache'));
2828
define('MEMCACHED_EXTENSION_LOADED', extension_loaded('memcached'));
2929
define('REDIS_EXTENSION_LOADED', extension_loaded('redis'));
@@ -111,7 +111,11 @@ public function init($options)
111111
}
112112

113113
public function _apc_init($options) {
114-
$this->cacheDriver = new Cache\ApcCache();
114+
if (extension_loaded('apcu')) {
115+
$this->cacheDriver = new Cache\ApcuCache();
116+
} else {
117+
$this->cacheDriver = new Cache\ApcCache();
118+
}
115119
}
116120

117121
public function _memcache_init($options) {

0 commit comments

Comments
 (0)