3 abstract class DivinerDiskCache
extends Phobject
{
7 public function __construct($cache_directory, $name) {
8 $dir_cache = id(new PhutilDirectoryKeyValueCache())
9 ->setCacheDirectory($cache_directory);
10 $profiled_cache = id(new PhutilKeyValueCacheProfiler($dir_cache))
11 ->setProfiler(PhutilServiceProfiler
::getInstance())
13 $this->cache
= $profiled_cache;
16 protected function getCache() {
20 public function delete() {
21 $this->getCache()->destroyCache();
26 * Convert a long-form hash key like `ccbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaN` into
27 * a shortened directory form, like `cc/bb/aaaaaaaaN`. In conjunction with
28 * @{class:PhutilDirectoryKeyValueCache}, this gives us nice directories
29 * inside `.divinercache` instead of a million hash files with huge names at
32 protected function getHashKey($hash) {