mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-08 21:08:29 +01:00
Rename PhutilKeyValueCache
subclasses
Summary: Ref T5655. Depends on D10155. Test Plan: Ran `arc unit` Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Maniphest Tasks: T5655 Differential Revision: https://secure.phabricator.com/D10156
This commit is contained in:
parent
8fd098329b
commit
4e9746ed4e
2 changed files with 7 additions and 7 deletions
10
src/applications/cache/PhabricatorCaches.php
vendored
10
src/applications/cache/PhabricatorCaches.php
vendored
|
@ -54,7 +54,7 @@ final class PhabricatorCaches {
|
||||||
private static function buildImmutableCaches() {
|
private static function buildImmutableCaches() {
|
||||||
$caches = array();
|
$caches = array();
|
||||||
|
|
||||||
$apc = new PhutilKeyValueCacheAPC();
|
$apc = new PhutilAPCKeyValueCache();
|
||||||
if ($apc->isAvailable()) {
|
if ($apc->isAvailable()) {
|
||||||
$caches[] = $apc;
|
$caches[] = $apc;
|
||||||
}
|
}
|
||||||
|
@ -80,11 +80,11 @@ final class PhabricatorCaches {
|
||||||
private static function buildRepositoryGraphL1Caches() {
|
private static function buildRepositoryGraphL1Caches() {
|
||||||
$caches = array();
|
$caches = array();
|
||||||
|
|
||||||
$request = new PhutilKeyValueCacheInRequest();
|
$request = new PhutilInRequestKeyValueCache();
|
||||||
$request->setLimit(32);
|
$request->setLimit(32);
|
||||||
$caches[] = $request;
|
$caches[] = $request;
|
||||||
|
|
||||||
$apc = new PhutilKeyValueCacheAPC();
|
$apc = new PhutilAPCKeyValueCache();
|
||||||
if ($apc->isAvailable()) {
|
if ($apc->isAvailable()) {
|
||||||
$caches[] = $apc;
|
$caches[] = $apc;
|
||||||
}
|
}
|
||||||
|
@ -141,7 +141,7 @@ final class PhabricatorCaches {
|
||||||
private static function buildSetupCaches() {
|
private static function buildSetupCaches() {
|
||||||
// In most cases, we should have APC. This is an ideal cache for our
|
// In most cases, we should have APC. This is an ideal cache for our
|
||||||
// purposes -- it's fast and empties on server restart.
|
// purposes -- it's fast and empties on server restart.
|
||||||
$apc = new PhutilKeyValueCacheAPC();
|
$apc = new PhutilAPCKeyValueCache();
|
||||||
if ($apc->isAvailable()) {
|
if ($apc->isAvailable()) {
|
||||||
return array($apc);
|
return array($apc);
|
||||||
}
|
}
|
||||||
|
@ -150,7 +150,7 @@ final class PhabricatorCaches {
|
||||||
// much better than nothing; some setup steps are quite slow.
|
// much better than nothing; some setup steps are quite slow.
|
||||||
$disk_path = self::getSetupCacheDiskCachePath();
|
$disk_path = self::getSetupCacheDiskCachePath();
|
||||||
if ($disk_path) {
|
if ($disk_path) {
|
||||||
$disk = new PhutilKeyValueCacheOnDisk();
|
$disk = new PhutilOnDiskKeyValueCache();
|
||||||
$disk->setCacheFile($disk_path);
|
$disk->setCacheFile($disk_path);
|
||||||
$disk->setWait(0.1);
|
$disk->setWait(0.1);
|
||||||
if ($disk->isAvailable()) {
|
if ($disk->isAvailable()) {
|
||||||
|
|
|
@ -5,7 +5,7 @@ abstract class DivinerDiskCache {
|
||||||
private $cache;
|
private $cache;
|
||||||
|
|
||||||
public function __construct($cache_directory, $name) {
|
public function __construct($cache_directory, $name) {
|
||||||
$dir_cache = id(new PhutilKeyValueCacheDirectory())
|
$dir_cache = id(new PhutilDirectoryKeyValueCache())
|
||||||
->setCacheDirectory($cache_directory);
|
->setCacheDirectory($cache_directory);
|
||||||
$profiled_cache = id(new PhutilKeyValueCacheProfiler($dir_cache))
|
$profiled_cache = id(new PhutilKeyValueCacheProfiler($dir_cache))
|
||||||
->setProfiler(PhutilServiceProfiler::getInstance())
|
->setProfiler(PhutilServiceProfiler::getInstance())
|
||||||
|
@ -25,7 +25,7 @@ abstract class DivinerDiskCache {
|
||||||
/**
|
/**
|
||||||
* Convert a long-form hash key like `ccbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaN` into
|
* Convert a long-form hash key like `ccbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaN` into
|
||||||
* a shortened directory form, like `cc/bb/aaaaaaaaN`. In conjunction with
|
* a shortened directory form, like `cc/bb/aaaaaaaaN`. In conjunction with
|
||||||
* @{class:PhutilKeyValueCacheDirectory}, this gives us nice directories
|
* @{class:PhutilDirectoryKeyValueCache}, this gives us nice directories
|
||||||
* inside .divinercache instead of a million hash files with huge names at
|
* inside .divinercache instead of a million hash files with huge names at
|
||||||
* top level.
|
* top level.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue