dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make ObjectCache check the value of apc.enable_cli in CLI mode
[lhc/web/wiklou.git]
/
includes
/
objectcache
/
ObjectCache.php
diff --git
a/includes/objectcache/ObjectCache.php
b/includes/objectcache/ObjectCache.php
index
ad0f67e
..
f1a96c8
100644
(file)
--- a/
includes/objectcache/ObjectCache.php
+++ b/
includes/objectcache/ObjectCache.php
@@
-393,12
+393,19
@@
class ObjectCache {
*/
public static function detectLocalServerCache() {
if ( function_exists( 'apcu_fetch' ) ) {
*/
public static function detectLocalServerCache() {
if ( function_exists( 'apcu_fetch' ) ) {
- return 'apcu';
+ // Make sure the APCu methods actually store anything
+ if ( PHP_SAPI !== 'cli' || ini_get( 'apc.enable_cli' ) ) {
+ return 'apcu';
+ }
} elseif ( function_exists( 'apc_fetch' ) ) {
} elseif ( function_exists( 'apc_fetch' ) ) {
- return 'apc';
+ // Make sure the APC methods actually store anything
+ if ( PHP_SAPI !== 'cli' || ini_get( 'apc.enable_cli' ) ) {
+ return 'apc';
+ }
} elseif ( function_exists( 'wincache_ucache_get' ) ) {
return 'wincache';
}
} elseif ( function_exists( 'wincache_ucache_get' ) ) {
return 'wincache';
}
+
return CACHE_NONE;
}
}
return CACHE_NONE;
}
}