filerepo: use makeGlobalKey() in ForiegnDBViaLBRepo::getSharedCacheKey()
Keys used by multiple wikis should use this key generation method. It also means settings like "coalesceKeys" in WANObjectCache will correctly identify these keys as being global. This change should be deployed on all wikis at once. Bug: T253405 Change-Id: Ie19613ef7643af92aeb56db203e3d79139143231
This commit is contained in:
parent
a001686895
commit
96ad0db6b4
2 changed files with 1 additions and 17 deletions
|
|
@ -117,13 +117,6 @@ class ForeignDBRepo extends LocalRepo {
|
|||
return $this->hasSharedCache;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a key on the primary cache for this repository.
|
||||
* Returns false if the repository's cache is not accessible at this site.
|
||||
* The parameters are the parts of the key, as for wfMemcKey().
|
||||
* @param mixed ...$args
|
||||
* @return bool|mixed
|
||||
*/
|
||||
public function getSharedCacheKey( ...$args ) {
|
||||
if ( $this->hasSharedCache() ) {
|
||||
return $this->wanCache->makeGlobalKey(
|
||||
|
|
|
|||
|
|
@ -82,18 +82,9 @@ class ForeignDBViaLBRepo extends LocalRepo {
|
|||
return $this->hasSharedCache;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a key on the primary cache for this repository.
|
||||
* Returns false if the repository's cache is not accessible at this site.
|
||||
* The parameters are the parts of the key, as for wfMemcKey().
|
||||
* @param mixed ...$args
|
||||
* @return bool|string
|
||||
*/
|
||||
public function getSharedCacheKey( ...$args ) {
|
||||
if ( $this->hasSharedCache() ) {
|
||||
array_unshift( $args, $this->wiki );
|
||||
|
||||
return implode( ':', $args );
|
||||
return $this->wanCache->makeGlobalKey( $this->wiki, ...$args );
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue