Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15467494
D18449.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
754 B
Referenced Files
None
Subscribers
None
D18449.diff
View Options
diff --git a/src/applications/cache/spec/PhabricatorDataCacheSpec.php b/src/applications/cache/spec/PhabricatorDataCacheSpec.php
--- a/src/applications/cache/spec/PhabricatorDataCacheSpec.php
+++ b/src/applications/cache/spec/PhabricatorDataCacheSpec.php
@@ -50,9 +50,15 @@
->setVersion(phpversion('apcu'));
if (ini_get('apc.enabled')) {
+ if (function_exists('apcu_clear_cache')) {
+ $clear_callback = 'apcu_clear_cache';
+ } else {
+ $clear_callback = 'apc_clear_cache';
+ }
+
$this
->setIsEnabled(true)
- ->setClearCacheCallback('apc_clear_cache');
+ ->setClearCacheCallback($clear_callback);
$this->initAPCCommonSpec();
} else {
$this->setIsEnabled(false);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 4, 3:34 PM (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7732175
Default Alt Text
D18449.diff (754 B)
Attached To
Mode
D18449: When "apcu_clear_cache()" exists, prefer it as a cache clear callback over "apc_clear_cache()"
Attached
Detach File
Event Timeline
Log In to Comment