HomePhabricator

UserOptionsManager: take into account $queryFlags when caching

Description

UserOptionsManager: take into account $queryFlags when caching

  • Don't care about $queryFlags for anons since nothing can be stored in the database for anons.
  • For loading the options - discard the old cache in case higher query flags are used. This means that 'setOption' has to by default reload the options to ensure changing the options start from LATEST. This codepath shouldn't be executed in reality cause we should be already loading the user with READ_LATEST if we want to update the options. Where that was not done - it was probably a bug.

Also, expose optional $queryFlags parameter for UserOptionsLookup
methods. Otherwise there's no way to read from master using public API.

Bug: T248527
Change-Id: Id7b9868ecdfba89bfafd4618365fe520ec59fcfe

Details

Provenance
PcheloloAuthored on May 28 2020, 6:40 PM
Parents
rMW26e8394dd95e: Merge "Hooks: Hard deprecate 2 hooks using Revision objects"
Branches
Unknown
Tags
Unknown
ChangeId
Id7b9868ecdfba89bfafd4618365fe520ec59fcfe