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

Commit

Permalink
Fix to #1157: adding support for apcu
Browse files Browse the repository at this point in the history
  • Loading branch information
ghecquet committed Apr 8, 2016
1 parent c653dd7 commit 182fd15
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/src/plugins/cache.doctrine/class.DoctrineCacheDriver.php
Expand Up @@ -23,7 +23,7 @@

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

define('APC_EXTENSION_LOADED', extension_loaded('apc'));
define('APC_EXTENSION_LOADED', extension_loaded('apc') || extension_loaded('apcu'));
define('MEMCACHE_EXTENSION_LOADED', extension_loaded('memcache'));
define('MEMCACHED_EXTENSION_LOADED', extension_loaded('memcached'));
define('REDIS_EXTENSION_LOADED', extension_loaded('redis'));
Expand Down Expand Up @@ -111,7 +111,11 @@ public function init($options)
}

public function _apc_init($options) {
$this->cacheDriver = new Cache\ApcCache();
if (extension_loaded('apcu')) {
$this->cacheDriver = new Cache\ApcuCache();
} else {
$this->cacheDriver = new Cache\ApcCache();
}
}

public function _memcache_init($options) {
Expand Down

0 comments on commit 182fd15

Please sign in to comment.