mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Gadgets
synced 2024-11-23 23:13:27 +00:00
Replace 'hash' with CACHE_HASH to improve discovery
Bug: T139216 Change-Id: Ifac0701050ca4ca25f1d3e103ce6db8734a2ec77
This commit is contained in:
parent
fd261440ca
commit
6e6f21b385
|
@ -83,7 +83,7 @@ class MediaWikiGadgetsDefinitionRepo extends GadgetRepo {
|
||||||
* Purge the definitions cache, for example when MediaWiki:Gadgets-definition is edited.
|
* Purge the definitions cache, for example when MediaWiki:Gadgets-definition is edited.
|
||||||
*/
|
*/
|
||||||
private function purgeDefinitionCache(): void {
|
private function purgeDefinitionCache(): void {
|
||||||
$srvCache = ObjectCache::getLocalServerInstance( 'hash' );
|
$srvCache = ObjectCache::getLocalServerInstance( CACHE_HASH );
|
||||||
$key = $this->makeDefinitionCacheKey( $this->wanCache );
|
$key = $this->makeDefinitionCacheKey( $this->wanCache );
|
||||||
|
|
||||||
$this->wanCache->delete( $key );
|
$this->wanCache->delete( $key );
|
||||||
|
@ -128,7 +128,7 @@ class MediaWikiGadgetsDefinitionRepo extends GadgetRepo {
|
||||||
// 1. process cache. Faster repeat calls.
|
// 1. process cache. Faster repeat calls.
|
||||||
if ( $this->definitions === null ) {
|
if ( $this->definitions === null ) {
|
||||||
$wanCache = $this->wanCache;
|
$wanCache = $this->wanCache;
|
||||||
$srvCache = ObjectCache::getLocalServerInstance( 'hash' );
|
$srvCache = ObjectCache::getLocalServerInstance( CACHE_HASH );
|
||||||
$key = $this->makeDefinitionCacheKey( $wanCache );
|
$key = $this->makeDefinitionCacheKey( $wanCache );
|
||||||
$this->definitions = $srvCache->getWithSetCallback(
|
$this->definitions = $srvCache->getWithSetCallback(
|
||||||
$key,
|
$key,
|
||||||
|
|
Loading…
Reference in a new issue