From fcd0231305bde7c6267891bb1d22715f41c95b5c Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 29 Apr 2015 11:42:05 -0700 Subject: [PATCH] Made getWithSetCallback doc comment clearer Change-Id: I68c3929691c886bcfee32499a6058f01f69ea63c --- includes/libs/objectcache/WANObjectCache.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/includes/libs/objectcache/WANObjectCache.php b/includes/libs/objectcache/WANObjectCache.php index 0437fad769..7f55456085 100755 --- a/includes/libs/objectcache/WANObjectCache.php +++ b/includes/libs/objectcache/WANObjectCache.php @@ -305,11 +305,14 @@ class WANObjectCache { * value (false if not present). If false is returned, then nothing * will be saved to cache. * - * Most callers should ignore the current value, but it can be used + * Usually, callbacks ignore the current value, but it can be used * to maintain "most recent X" values that come from time or sequence * based source data, provided that the "as of" id/time is tracked. * - * Usage of $checkKeys is the same as with get(). + * Usage of $checkKeys is similar to get()/getMulti(). However, + * rather than the caller having to inspect a "current time left" + * variable (e.g. $curTTL, $curTTLs), a cache regeneration will be + * triggered using the callback. * * The simplest way to avoid stampedes for hot keys is to use * the 'lockTSE' option in $opts. If cache purges are needed, also: -- 2.20.1