wiki.techinc.nl/includes/cache/ObjectFileCache.php

31 lines
587 B
PHP
Raw Normal View History

<?php
2011-09-29 21:17:43 +00:00
/**
* Contain the ObjectFileCache class
* @file
* @ingroup Cache
*/
class ObjectFileCache extends FileCacheBase {
2011-09-29 21:17:43 +00:00
/**
* Construct an ObjectFileCache from a key and a type
* @param $key string
* @param $type string
* @return ObjectFileCache
*/
public static function newFromKey( $key, $type ) {
$cache = new self();
$cache->mKey = (string)$key;
$cache->mType = (string)$type;
return $cache;
}
/**
* Get the base file cache directory
* @return string
*/
protected function cacheDirectory() {
return $this->baseCacheDirectory() . '/object';
}
}