FU r98405: ObjectFileCache doesn't need to be abstract
[lhc/web/wiklou.git] / includes / cache / ObjectFileCache.php
1 <?php
2 /**
3 * Contain the ObjectFileCache class
4 * @file
5 * @ingroup Cache
6 */
7 class ObjectFileCache extends FileCacheBase {
8 /**
9 * Construct an ObjectFileCache from a key and a type
10 * @param $key string
11 * @param $type string
12 * @return ObjectFileCache
13 */
14 public static function newFromKey( $key, $type ) {
15 $cache = new self();
16
17 $cache->mKey = (string)$key;
18 $cache->mType = (string)$type;
19
20 return $cache;
21 }
22
23 /**
24 * Get the base file cache directory
25 * @return string
26 */
27 protected function cacheDirectory() {
28 return $this->baseCacheDirectory() . '/object';
29 }
30 }