resourceloader: Add filename to validateScriptFile cache key
* Add fileName to cache key to fix T52919. The cached parsed error message contains the filename, this should be part of the cache key as otherwise two identical user scripts may report the same error message, including " on line X of page Y" where Y is whichever of the two pages first created the cache entry. * Make the cache key global instead of per-wiki. There is no need for this to be per-wiki. Bug: T52919 Change-Id: I6c2718c53be7f6384a6486a4a8718ae7f423d216
This commit is contained in:
parent
702bce40d0
commit
3a748592f8
1 changed files with 3 additions and 2 deletions
|
|
@ -936,11 +936,12 @@ abstract class ResourceLoaderModule implements LoggerAwareInterface {
|
|||
}
|
||||
$cache = ObjectCache::getMainWANInstance();
|
||||
return $cache->getWithSetCallback(
|
||||
$cache->makeKey(
|
||||
$cache->makeGlobalKey(
|
||||
'resourceloader',
|
||||
'jsparse',
|
||||
self::$parseCacheVersion,
|
||||
md5( $contents )
|
||||
md5( $contents ),
|
||||
$fileName
|
||||
),
|
||||
$cache::TTL_WEEK,
|
||||
function () use ( $contents, $fileName ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue