bug 59884 was caused by the typo:
$pathKey = wfForeignMemcKey( 'flow', '', 'tree', 'rootpath', $descendant->getHex() ); $cacheKeys[$descendant->getHex()] = wfForeignMemcKey( 'flow', 'tree', 'rootpath', $descendant->getHex() );
The initial conclusion was
- write caching tests that would fail in this case with "Item should be in cache".
But we could avoid the bug by:
- eliminate typo by using a constant for the cache key.
- add a class method to generate the cache key.
- have a high-level class implement cacheThis => true
- add a class method to generate the cache key.
Version: master
Severity: normal