* 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
}
$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 ) {