Skip to content

Commit

Permalink
Check for Xcache from INI setting
Browse files Browse the repository at this point in the history
On a shared webhosting the Xcache module is loaded, but it can be disabled with .htaccess `php_flag xcache.cacher Off` which causes issues.
  • Loading branch information
mikaelz authored Jun 22, 2016
1 parent 04b48ae commit 7ef3e3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Doctrine/ORM/Tools/Setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public static function createConfiguration($isDevMode = false, $proxyDir = null,
if ($isDevMode === false && $cache === null) {
if (extension_loaded('apc')) {
$cache = new \Doctrine\Common\Cache\ApcCache();
} elseif (extension_loaded('xcache')) {
} elseif (ini_get('xcache.cacher')) {
$cache = new \Doctrine\Common\Cache\XcacheCache();
} elseif (extension_loaded('memcache')) {
$memcache = new \Memcache();
Expand Down

0 comments on commit 7ef3e3a

Please sign in to comment.