filerepo: clean up remote description cache keys
Hash the file name portion and make the string constant portions more relevant to what the keys are actually used for (e.g. there is no URL parameter in the key) Bug: T198279 Change-Id: Idf6f97db26f5be291cdd3a50a91346677fe9c3e6
This commit is contained in:
parent
fa707ff8d4
commit
8804df2da5
2 changed files with 3 additions and 5 deletions
|
|
@ -2068,9 +2068,8 @@ abstract class File implements IDBAccessObject {
|
|||
$cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
|
||||
$key = $this->repo->getLocalCacheKey(
|
||||
'RemoteFileDescription',
|
||||
'url',
|
||||
$lang->getCode(),
|
||||
$this->getName()
|
||||
md5( $this->getName() )
|
||||
);
|
||||
|
||||
return $cache->getWithSetCallback(
|
||||
|
|
|
|||
|
|
@ -155,10 +155,9 @@ class ForeignDBFile extends LocalFile {
|
|||
|
||||
return $cache->getWithSetCallback(
|
||||
$this->repo->getLocalCacheKey(
|
||||
'RemoteFileDescription',
|
||||
'url',
|
||||
'ForeignFileDescription',
|
||||
$lang->getCode(),
|
||||
$this->getName(),
|
||||
md5( $this->getName() ),
|
||||
$touched
|
||||
),
|
||||
$this->repo->descriptionCacheExpiry ?: $cache::TTL_UNCACHEABLE,
|
||||
|
|
|
|||
Loading…
Reference in a new issue