diff --git a/src/applications/cache/PhabricatorCaches.php b/src/applications/cache/PhabricatorCaches.php index 5824c6458c..1127a7312b 100644 --- a/src/applications/cache/PhabricatorCaches.php +++ b/src/applications/cache/PhabricatorCaches.php @@ -206,40 +206,12 @@ final class PhabricatorCaches extends Phobject { // otherwise (we desire this property to give the cache the best hit rate // we can). - // In some setups, the parent PID is more stable and longer-lived that the - // PID (e.g., under apache, our PID will be a worker while the ppid will - // be the main httpd process). If we're confident we're running under such - // a setup, we can try to use the PPID as the basis for our cache instead - // of our own PID. - $use_ppid = false; - - switch (php_sapi_name()) { - case 'cli-server': - // This is the PHP5.4+ built-in webserver. We should use the pid - // (the server), not the ppid (probably a shell or something). - $use_ppid = false; - break; - case 'fpm-fcgi': - // We should be safe to use PPID here. - $use_ppid = true; - break; - case 'apache2handler': - // We're definitely safe to use the PPID. - $use_ppid = true; - break; - } + // Unfortunately, we don't have a very good strategy for minimizing the + // churn rate of the cache. We previously tried to use the parent process + // PID in some cases, but this was not reliable. See T9599 for one case of + // this. $pid_basis = getmypid(); - if ($use_ppid) { - if (function_exists('posix_getppid')) { - $parent_pid = posix_getppid(); - // On most systems, normal processes can never have PIDs lower than 100, - // so something likely went wrong if we we get one of these. - if ($parent_pid > 100) { - $pid_basis = $parent_pid; - } - } - } // If possible, we also want to know when the process launched, so we can // drop the cache if a process restarts but gets the same PID an earlier diff --git a/src/applications/cache/spec/PhabricatorDataCacheSpec.php b/src/applications/cache/spec/PhabricatorDataCacheSpec.php index f5fe1c6277..eae5d75790 100644 --- a/src/applications/cache/spec/PhabricatorDataCacheSpec.php +++ b/src/applications/cache/spec/PhabricatorDataCacheSpec.php @@ -63,7 +63,9 @@ final class PhabricatorDataCacheSpec extends PhabricatorCacheSpec { private function initNoneSpec() { if (version_compare(phpversion(), '5.5', '>=')) { $message = pht( - 'Installing the "APCu" PHP extension will improve performance.'); + 'Installing the "APCu" PHP extension will improve performance. '. + 'This extension is strongly recommended. Without it, Phabricator '. + 'must rely on a very inefficient disk-based cache.'); $this ->newIssue('extension.apcu')