Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F5486272
D26091.1750120710.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
6 KB
Referenced Files
None
Subscribers
None
D26091.1750120710.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
@@ -33,8 +33,6 @@
if (ini_get('apc.enabled')) {
if (function_exists('apcu_clear_cache')) {
$clear_callback = 'apcu_clear_cache';
- } else {
- $clear_callback = 'apc_clear_cache';
}
$this
@@ -67,9 +65,6 @@
if (function_exists('apcu_sma_info')) {
$mem = apcu_sma_info();
$info = apcu_cache_info();
- } else if (function_exists('apc_sma_info')) {
- $mem = apc_sma_info();
- $info = apc_cache_info('user');
} else {
$mem = null;
}
diff --git a/src/infrastructure/cache/PhutilAPCKeyValueCache.php b/src/infrastructure/cache/PhutilAPCKeyValueCache.php
--- a/src/infrastructure/cache/PhutilAPCKeyValueCache.php
+++ b/src/infrastructure/cache/PhutilAPCKeyValueCache.php
@@ -11,7 +11,7 @@
public function isAvailable() {
- return (function_exists('apc_fetch') || function_exists('apcu_fetch')) &&
+ return function_exists('apcu_fetch') &&
ini_get('apc.enabled') &&
(ini_get('apc.enable_cli') || php_sapi_name() != 'cli');
}
@@ -27,8 +27,6 @@
foreach ($keys as $key) {
if ($is_apcu) {
$result = apcu_fetch($key, $fetched);
- } else {
- $result = apc_fetch($key, $fetched);
}
if ($fetched) {
@@ -48,8 +46,8 @@
$ttl = 0;
}
- // NOTE: Although modern APC supports passing an array to `apc_store()`,
- // it is not supported by older version of APC or by HPHP.
+ // NOTE: Although late APC supported passing an array to `apc_store()`,
+ // it was not supported by older versions of APC or by HPHP.
// See T13525 for discussion of use of "@" to silence this warning:
// > GC cache entry "<some-key-name>" was on gc-list for <X> seconds
@@ -57,8 +55,6 @@
foreach ($keys as $key => $value) {
if ($is_apcu) {
@apcu_store($key, $value, $ttl);
- } else {
- @apc_store($key, $value, $ttl);
}
}
@@ -74,8 +70,6 @@
foreach ($keys as $key) {
if ($is_apcu) {
apcu_delete($key);
- } else {
- apc_delete($key);
}
}
@@ -90,8 +84,6 @@
if ($is_apcu) {
apcu_clear_cache();
- } else {
- apc_clear_cache('user');
}
return $this;
diff --git a/src/infrastructure/cache/__tests__/PhutilKeyValueCacheTestCase.php b/src/infrastructure/cache/__tests__/PhutilKeyValueCacheTestCase.php
--- a/src/infrastructure/cache/__tests__/PhutilKeyValueCacheTestCase.php
+++ b/src/infrastructure/cache/__tests__/PhutilKeyValueCacheTestCase.php
@@ -234,9 +234,9 @@
// NOTE: The TTL tests are necessarily slow (we must sleep() through the
- // TTLs) and do not work with APC (it does not TTL until the next request)
- // so they're disabled by default. If you're developing the cache stack,
- // it may be useful to run them.
+ // TTLs) and did not work with old APC (it does not TTL until the next
+ // request) so they're disabled by default. If you're developing the cache
+ // stack, it may be useful to run them.
return;
diff --git a/support/startup/PhabricatorClientLimit.php b/support/startup/PhabricatorClientLimit.php
--- a/support/startup/PhabricatorClientLimit.php
+++ b/support/startup/PhabricatorClientLimit.php
@@ -37,10 +37,10 @@
// NOTE: We can not use pht() here because this runs before libraries
// load.
- if (!function_exists('apc_fetch') && !function_exists('apcu_fetch')) {
+ if (!function_exists('apcu_fetch')) {
throw new Exception(
- 'You can not configure connection rate limits unless APC/APCu are '.
- 'available. Rate limits rely on APC/APCu to track clients and '.
+ 'You can not configure connection rate limits unless APCu is '.
+ 'available. Rate limits rely on APCu to track clients and '.
'connections.');
}
@@ -199,8 +199,6 @@
if ($is_apcu) {
$bucket = apcu_fetch($bucket_key);
- } else {
- $bucket = apc_fetch($bucket_key);
}
if (!is_array($bucket)) {
@@ -216,8 +214,6 @@
if ($is_apcu) {
@apcu_store($bucket_key, $bucket);
- } else {
- @apc_store($bucket_key, $bucket);
}
return $this;
@@ -237,8 +233,6 @@
$min_key = $this->getMinimumBucketCacheKey();
if ($is_apcu) {
$min = apcu_fetch($min_key);
- } else {
- $min = apc_fetch($min_key);
}
// If we don't have any buckets stored yet, store the current bucket as
@@ -247,8 +241,6 @@
if (!$min) {
if ($is_apcu) {
@apcu_store($min_key, $cur);
- } else {
- @apc_store($min_key, $cur);
}
$min = $cur;
}
@@ -262,9 +254,6 @@
if ($is_apcu) {
apcu_delete($bucket_key);
@apcu_store($min_key, $cursor + 1);
- } else {
- apc_delete($bucket_key);
- @apc_store($min_key, $cursor + 1);
}
}
@@ -276,8 +265,6 @@
$bucket_key = $this->getBucketCacheKey($cursor);
if ($is_apcu) {
$bucket = apcu_fetch($bucket_key);
- } else {
- $bucket = apc_fetch($bucket_key);
}
if (isset($bucket[$client_key])) {
$score += $bucket[$client_key];
diff --git a/support/startup/PhabricatorStartup.php b/support/startup/PhabricatorStartup.php
--- a/support/startup/PhabricatorStartup.php
+++ b/support/startup/PhabricatorStartup.php
@@ -557,22 +557,6 @@
}
}
- if (extension_loaded('apc')) {
- $apc_version = phpversion('apc');
- $known_bad = array(
- '3.1.14' => true,
- '3.1.15' => true,
- '3.1.15-dev' => true,
- );
- if (isset($known_bad[$apc_version])) {
- self::didFatal(
- "You have APC {$apc_version} installed. This version of APC is ".
- "known to be bad, and does not work with Phorge (it will cause ".
- "Phorge to fatal unrecoverably with nonsense errors).".
- "Downgrade to version 3.1.13.");
- }
- }
-
if (isset($_SERVER['HTTP_PROXY'])) {
self::didFatal(
'This HTTP request included a "Proxy:" header, poisoning the '.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jun 17, 00:38 (10 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1880145
Default Alt Text
D26091.1750120710.diff (6 KB)
Attached To
Mode
D26091: Remove remaining calls to discontinued APC
Attached
Detach File
Event Timeline
Log In to Comment