X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Ffilebackend%2FFileBackendStore.php;h=9bec145d295f0e5ec7f516e559ad015c6acdd76a;hb=84a54a63c55b345d03d12be9b81a0b36a19a0500;hp=852a6538db37226412fcc6ee56bf1d39278e2ca9;hpb=c024eaddc2ae38191f64e3b309d8fb0fb990cd6b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/filebackend/FileBackendStore.php b/includes/filebackend/FileBackendStore.php index 852a6538db..9bec145d29 100644 --- a/includes/filebackend/FileBackendStore.php +++ b/includes/filebackend/FileBackendStore.php @@ -989,7 +989,9 @@ abstract class FileBackendStore extends FileBackend { } // Clear any file cache entries (after locks acquired) - $this->clearCache(); + if ( empty( $opts['preserveCache'] ) ) { + $this->clearCache(); + } // Load from the persistent file and container caches $this->primeFileCache( $performOps ); @@ -1106,6 +1108,20 @@ abstract class FileBackendStore extends FileBackend { return array(); } + /** + * @see FileBackend::preloadCache() + */ + final public function preloadCache( array $paths ) { + $fullConts = array(); // full container names + foreach ( $paths as $path ) { + list( $fullCont, $r, $s ) = $this->resolveStoragePath( $path ); + $fullConts[] = $fullCont; + } + // Load from the persistent file and container caches + $this->primeContainerCache( $fullConts ); + $this->primeFileCache( $paths ); + } + /** * @see FileBackend::clearCache() */