From f1709918977227b9e4c173383aae941eb8f18c73 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 12 May 2014 12:34:04 -0700 Subject: [PATCH] Put an in-request cache in front of APC Summary: Most requests examine the same buckets, especially the first bucket. Let them just read it out of request cache. Test Plan: Observed most bucket fetches resolving in <10us instead of <10ms. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D9080 --- src/applications/cache/PhabricatorCaches.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/applications/cache/PhabricatorCaches.php b/src/applications/cache/PhabricatorCaches.php index 64193a579d..7a5a2d602f 100644 --- a/src/applications/cache/PhabricatorCaches.php +++ b/src/applications/cache/PhabricatorCaches.php @@ -32,6 +32,10 @@ final class PhabricatorCaches { private static function buildRepositoryGraphL1Caches() { $caches = array(); + $request = new PhutilKeyValueCacheInRequest(); + $request->setLimit(32); + $caches[] = $request; + $apc = new PhutilKeyValueCacheAPC(); if ($apc->isAvailable()) { $caches[] = $apc;