Page MenuHomePhabricator

Flow: avoiding cache bugs
Closed, ResolvedPublic

Description

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

Version: master
Severity: normal

Details

Reference
bz60152

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:01 AM
bzimport set Reference to bz60152.
bzimport added a subscriber: Unknown Object (MLST).

bingle-admin wrote:

The WMF core features team tracks this bug on Mingle card https://wikimedia.mingle.thoughtworks.com/projects/flow/cards/724, but people from the community are welcome to contribute here and in Gerrit.

Change 110472 had a related patch set uploaded by Bsitu:
Add cacheKey function and tests to TreeRepository + typo fix

https://gerrit.wikimedia.org/r/110472

Change 110472 merged by jenkins-bot:
Add cacheKey function and tests to TreeRepository + typo fix

https://gerrit.wikimedia.org/r/110472