wiki.techinc.nl/includes/cache
Timo Tijhof 67f3df57f9 MessageCache: Replace internal loadedLanguages array with special cache key
Before c962b48056, the 'loadedLanguages' array was used to track
which languages were loaded and in the cache, with 'cache' being a
simple array. In that commit, the 'cache' array also started being used
for incomplete datasets, which didn't affect 'loadedLanguages'.

Then in 97e86d934b, the 'loadedLanguages' array was removed in favour
of checking keys on 'cache' directly, and 'cache' was converted to
MapCacheLRU.

This led to problem where partially loaded data was mistaken for being
full datasets (fatal error, T208897). This was fixed in a5c984cc59,
by bringing back the 'loadedLanguages' array, which fixed the issue from
the POV of partially loaded data.

However, this then exposed a new problem. The 'cache' data can be evicted
by MapCacheLRU, whereas 'loadedLanguages' is not aware of that. Thus it
claims languages are loaded that sometimes aren't. (This only affects web
requests where more than 5 language codes are involved, per MapCacheLRU.)

Fix this by re-removing the 'loadedLanguages' array, this time
strengthening the 'cache' key check to not just check that the root key
exists, but that it is in fact holding the full dataset as generated by
MessageCache::load(). The 'VERSION' key appears to be a good proxy for
that.

Bug: T230690
Change-Id: I1162a3857376aa37e5894ae3c8be84a2295782a3
2019-10-02 22:47:00 +00:00
..
dependency Collapse some nested if statements 2019-04-04 19:02:22 +00:00
localisation localisation: Remove PHP5-specific perf optimisation 2019-09-21 02:31:04 +01:00
BacklinkCache.php Unsuppress other phan issues with low count 2019-08-30 09:42:15 +00:00
CacheHelper.php Unsuppress other phan issues (part 4) 2019-08-31 17:13:39 +00:00
FileCacheBase.php Migrate BagOStuff::incr() calls to incrWithInit() 2019-08-25 01:15:32 +00:00
GenderCache.php Inject LoadBalancer into GenderCache 2019-08-07 15:15:14 +02:00
HTMLFileCache.php Setup: Move MWDebug logic to MWDebug.php 2019-09-04 16:33:25 +00:00
ICacheHelper.php Move interface ICacheHelper to own class 2019-02-05 20:04:12 +01:00
LinkBatch.php Use IResultWrapper in code comments instead of ResultWrapper 2019-06-22 17:58:39 +00:00
LinkCache.php Move callers away from Title::GAID_FOR_UPDATE 2019-09-09 13:19:08 -07:00
MessageCache.php MessageCache: Replace internal loadedLanguages array with special cache key 2019-10-02 22:47:00 +00:00
ResourceFileCache.php
UserCache.php Mostly drop old pre-actor user schemas 2019-09-09 11:38:36 -04:00