diff --git a/composer.json b/composer.json index 12613bf..c2e5862 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ ], "require" : { "php" : ">=5.3.0", - "doctrine/cache" : "~1.4", + "doctrine/cache" : "~1.6", "mouf/utils.constants.debug" : "~1.0", "mouf/utils.constants.secret" : "~1.0", "mouf/utils.cache.cache-interface" : "~2.0" @@ -38,4 +38,4 @@ "logo" : "logo.png" } } -} \ No newline at end of file +} diff --git a/src/CacheInstaller.php b/src/CacheInstaller.php index e9b5981..5ec40bc 100644 --- a/src/CacheInstaller.php +++ b/src/CacheInstaller.php @@ -28,7 +28,9 @@ public static function install(MoufManager $moufManager) { $driver = new \\Doctrine\\Common\\Cache\\ArrayCache(); } else { // If APC is available, let\'s use APC - if (extension_loaded("apc")) { + if (extension_loaded("apcu")) { + $driver = new \\Doctrine\\Common\\Cache\\ApcuCache(); + } else if (extension_loaded("apc")) { $driver = new \\Doctrine\\Common\\Cache\\ApcCache(); } else { $driver = new \\Doctrine\\Common\\Cache\\FileCache(sys_get_temp_dir().\'/doctrinecache\');