HomePhabricator

Introduce and use MessageGroups::recache

Description

Introduce and use MessageGroups::recache

MessageGroups::clearCache has two downsides:

  • The cache will be repopulated by a random thread, which on high traffic sites is unlikely to see the changes done by the thread clearing the cache
  • Multiple threads may start repopulating the cache simultaneously, causing unnecessary extra load

Replaced clearCache with the new recache to update the cache immediately
with fresh data (except in tests). A small race condition still
remains if multiple threads are doing changes at the same time,
some of the changes might be ignored until next recache happens.

Removed a call in TranslatablePage, it's not its business to deal
with the cache. I checked that all callers of addMarkedTag do clear
the cache.

Change-Id: Ide74a8ba57dcf23d2c86cd7e5fa6ce11e1f8c414

Details

Provenance
NikerabbitAuthored on
Amire80Committed on May 18 2015, 10:10 AM
Parents
rETRA38542a25000c: Merge "Finish cleanup of RevTag schema migration"
Branches
Unknown
Tags
Unknown
ChangeId
Ide74a8ba57dcf23d2c86cd7e5fa6ce11e1f8c414