Page MenuHomePhabricator

D14302.diff
No OneTemporary

D14302.diff

diff --git a/src/applications/cache/PhabricatorCaches.php b/src/applications/cache/PhabricatorCaches.php
--- a/src/applications/cache/PhabricatorCaches.php
+++ b/src/applications/cache/PhabricatorCaches.php
@@ -206,40 +206,12 @@
// 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
--- a/src/applications/cache/spec/PhabricatorDataCacheSpec.php
+++ b/src/applications/cache/spec/PhabricatorDataCacheSpec.php
@@ -63,7 +63,9 @@
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')

File Metadata

Mime Type
text/plain
Expires
Sat, Oct 26, 2:24 PM (3 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6739760
Default Alt Text
D14302.diff (2 KB)

Event Timeline