diff options
author | Umherirrender <umherirrender_de.wp@web.de> | 2020-11-02 13:31:33 +0100 |
---|---|---|
committer | Umherirrender <umherirrender_de.wp@web.de> | 2020-11-02 13:31:33 +0100 |
commit | de1b56caf739abfff268f3932133fc19db3ccc90 (patch) | |
tree | 62aa6d857e96ab3ab325cff3de56ecefab5f61bd | |
parent | 3173b984206ccd6c63b763ead940fe22705e0e18 (diff) | |
download | mediawikicore-de1b56caf739abfff268f3932133fc19db3ccc90.tar.gz mediawikicore-de1b56caf739abfff268f3932133fc19db3ccc90.zip |
Replace deprecated wfGetCache
Change-Id: I082b95bf0dcf3625f3c71689e78643b55238b5f8
-rw-r--r-- | includes/cache/CacheHelper.php | 4 | ||||
-rw-r--r-- | includes/specials/SpecialVersion.php | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/includes/cache/CacheHelper.php b/includes/cache/CacheHelper.php index 35c1cf7a2454..c2896637d03a 100644 --- a/includes/cache/CacheHelper.php +++ b/includes/cache/CacheHelper.php @@ -174,7 +174,7 @@ class CacheHelper implements ICacheHelper { */ protected function initCaching() { if ( $this->cacheEnabled && $this->hasCached === null ) { - $cachedChunks = wfGetCache( CACHE_ANYTHING )->get( $this->getCacheKeyString() ); + $cachedChunks = ObjectCache::getInstance( CACHE_ANYTHING )->get( $this->getCacheKeyString() ); $this->hasCached = is_array( $cachedChunks ); $this->cachedChunks = $this->hasCached ? $cachedChunks : []; @@ -250,7 +250,7 @@ class CacheHelper implements ICacheHelper { */ public function saveCache() { if ( $this->cacheEnabled && $this->hasCached === false && !empty( $this->cachedChunks ) ) { - wfGetCache( CACHE_ANYTHING )->set( + ObjectCache::getInstance( CACHE_ANYTHING )->set( $this->getCacheKeyString(), $this->cachedChunks, $this->cacheExpiry diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index af03de03144a..1cc92d39e4aa 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -807,7 +807,7 @@ class SpecialVersion extends SpecialPage { $this->coreId = $coreHeadSHA1; } } - $cache = wfGetCache( CACHE_ANYTHING ); + $cache = ObjectCache::getInstance( CACHE_ANYTHING ); $memcKey = $cache->makeKey( 'specialversion-ext-version-text', $extension['path'], $this->coreId ); |