abstract class FileBackendStore extends FileBackend {
/** @var WANObjectCache */
protected $memCache;
+ /** @var BagOStuff */
+ protected $srvCache;
/** @var ProcessCacheLRU Map of paths to small (RAM/disk) cache items */
protected $cheapCache;
/** @var ProcessCacheLRU Map of paths to large (RAM/disk) cache items */
/**
* @see FileBackend::__construct()
* Additional $config params include:
+ * - srvCache : BagOStuff cache to APC/XCache or the like.
* - wanCache : WANObjectCache object to use for persistent caching.
* - mimeCallback : Callback that takes (storage path, content, file system path) and
* returns the MIME type of the file or 'unknown/unknown'. The file
$this->mimeCallback = isset( $config['mimeCallback'] )
? $config['mimeCallback']
: null;
+ $this->srvCache = new EmptyBagOStuff(); // disabled by default
$this->memCache = WANObjectCache::newEmpty(); // disabled by default
$this->cheapCache = new ProcessCacheLRU( self::CACHE_CHEAP_SIZE );
$this->expensiveCache = new ProcessCacheLRU( self::CACHE_EXPENSIVE_SIZE );
/**
* @see FileBackendStore::getFileStat()
+ * @param array $params
*/
abstract protected function doGetFileStat( array $params );
/**
* @see FileBackendStore::getFileXAttributes()
- * @return bool|string
+ * @param array $params
+ * @return array[][]
*/
protected function doGetFileXAttributes( array $params ) {
return [ 'headers' => [], 'metadata' => [] ]; // not supported
// Build the list of paths involved
$paths = [];
- foreach ( $performOps as $op ) {
- $paths = array_merge( $paths, $op->storagePathsRead() );
- $paths = array_merge( $paths, $op->storagePathsChanged() );
+ foreach ( $performOps as $performOp ) {
+ $paths = array_merge( $paths, $performOp->storagePathsRead() );
+ $paths = array_merge( $paths, $performOp->storagePathsChanged() );
}
// Enlarge the cache to fit the stat entries of these files