wiki.techinc.nl/includes/user
Timo Tijhof 3bbccc8da6 User: Simplify process cache by using WANObjectCache::getWithSetCallback
Follows-up 7d67b4d919, 9c733318.

* Convert loadFromId() to use getWithSetCallback() and centralise
  cache access logic there instead of spread between loadFromCache()
  and saveToCache().

* Remove process cache from User class (added in 9c733318).
  Instead, tell WANObjectCache to process-cache the key for 30 seconds.

* No need to deal with process cache in purge() because load uses slaves by
  default and may be lagged. Reads that require READ_LATEST already bypass
  the cache.

* Remove saveToCache() and move logic to loadFromCache().
  It was technically a public method, but marked private and no longer used
  in any extensions.

* Remove redundant isAnon() check in loadFromCache().
  This is already done by loadFromId() and loadFromDatabase().

* Remove hasOrMadeRecentMasterChanges() check. It was used to add READ_LATEST
  to the flags. However, this check only occurred if either READ_LATEST was
  already set, or after consulting cache. Which means in general, it never
  does anything. If we want to keep this, we should probably move it higher up.

* Let WANObjectCache handle cache version. That way, there is no longer separate
  logic for "populate cache" and "cache lookup failed". Instead, there is
  just "get data" that tries cache first.

  I've considered moving the version into the cache key (like we do elsewhere)
  but that would be problematic here since User cache must be purgeable
  cross-wiki and other wikis may run a different version (either in general,
  or even just during a deployment). As such, the key must remain unchanged when
  the version changes so that purges from newer wikis affect what older wikis see
  and vice versa.

Change-Id: Icfbc54dfd0ea594dd52fc1cfd403a7f66f1dd0b0
2016-05-31 21:13:08 -07:00
..
BotPassword.php Use ::class in place of string constants 2016-03-28 14:53:45 -04:00
CentralIdLookup.php Revert "Allow reset of global services." 2016-04-11 13:40:28 -07:00
LocalIdLookup.php Convert all array() syntax to [] 2016-02-17 01:33:00 -08:00
LoggedOutEditToken.php Change \\ to \ in phpdoc 2016-04-08 17:46:30 +00:00
PasswordReset.php Use AuthManager on special pages 2016-05-16 15:12:13 +00:00
User.php User: Simplify process cache by using WANObjectCache::getWithSetCallback 2016-05-31 21:13:08 -07:00
UserArray.php Convert all array() syntax to [] 2016-02-17 01:33:00 -08:00
UserArrayFromResult.php
UserNamePrefixSearch.php Convert all array() syntax to [] 2016-02-17 01:33:00 -08:00
UserRightsProxy.php Convert all array() syntax to [] 2016-02-17 01:33:00 -08:00