Page MenuHomePhabricator

Make disk-based setup caches more correct (but slower)
ClosedPublic

Authored by epriestley on Oct 19 2015, 4:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 3, 10:00 AM
Unknown Object (File)
Thu, May 2, 10:28 PM
Unknown Object (File)
Mon, Apr 29, 8:12 AM
Unknown Object (File)
Thu, Apr 25, 3:25 AM
Unknown Object (File)
Tue, Apr 9, 3:16 AM
Unknown Object (File)
Apr 3 2024, 8:38 PM
Unknown Object (File)
Apr 3 2024, 3:46 PM
Unknown Object (File)
Feb 6 2024, 4:07 AM
Subscribers
None

Details

Summary

Fixes T9599. When APC/APCu are not available, we fall back to a disk-based cache.

We try to share this cache across webserver processes like APC/APCu would be shared in order to improve performance, but are just kind of guessing how to coordinate it. From T9599, it sounds like we don't always get this right in every configuration.

Since this is complicated and error prone, just stop trying to do this. This cache has bad performance anyway (no production install should be using it), and we have much better APC/APCu setup instructions now than we did when I wrote this. Just using the PID is simpler and more correct.

Test Plan
  • Artificially disabled APC.
  • Reloaded the page, saw all the setup stuff run.
  • Reloaded the page, saw no setup stuff run (i.e., cache was hit).
  • Restarted the webserver.
  • Reloaded the page, saw all the setup stuff run.
  • Reloaded again, got a cache hit.

I don't really know how to reproduce the exact problem with the parent PID not working, but from T9599 it sounds like this fixed the issue and from my test plan we still appear to get correct behavior in the standard/common case.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Make disk-based setup caches more correct (but slower).
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
src/applications/cache/spec/PhabricatorDataCacheSpec.php
66–69

APC already has strong language ("dramatic" performance improvement) so I didn't strengthen that one.

chad edited edge metadata.
This revision is now accepted and ready to land.Oct 19 2015, 4:59 PM
This revision was automatically updated to reflect the committed changes.