Merge "mw.htmlform: Fields hidden with 'hide-if' should be disabled"
[lhc/web/wiklou.git] / includes / libs / filebackend / FileBackendStore.php
index 66f0737..a7ceab2 100644 (file)
@@ -38,6 +38,8 @@
 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 */
@@ -58,6 +60,7 @@ abstract class FileBackendStore extends FileBackend {
        /**
         * @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
@@ -70,6 +73,7 @@ abstract class FileBackendStore extends FileBackend {
                $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 );
@@ -671,6 +675,7 @@ abstract class FileBackendStore extends FileBackend {
 
        /**
         * @see FileBackendStore::getFileStat()
+        * @param array $params
         */
        abstract protected function doGetFileStat( array $params );
 
@@ -723,7 +728,8 @@ abstract class FileBackendStore extends FileBackend {
 
        /**
         * @see FileBackendStore::getFileXAttributes()
-        * @return bool|string
+        * @param array $params
+        * @return array[][]
         */
        protected function doGetFileXAttributes( array $params ) {
                return [ 'headers' => [], 'metadata' => [] ]; // not supported
@@ -1092,9 +1098,9 @@ abstract class FileBackendStore extends FileBackend {
 
                // 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