From 77a949dea6f5526dfa8bd6db7119fd30662e155f Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 6 May 2015 20:38:53 -0700 Subject: [PATCH] Added more lockTSE comments to getWithSetCallback() Change-Id: I6ac56784bc231d7dec7869c6d2b901341bde6e9b --- includes/libs/objectcache/WANObjectCache.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/libs/objectcache/WANObjectCache.php b/includes/libs/objectcache/WANObjectCache.php index 7f55456085..92bd0bdfa6 100755 --- a/includes/libs/objectcache/WANObjectCache.php +++ b/includes/libs/objectcache/WANObjectCache.php @@ -361,10 +361,12 @@ class WANObjectCache { * - lowTTL : consider pre-emptive updates when the current TTL (sec) * of the key is less than this. It becomes more likely * over time, becoming a certainty once the key is expired. - * - lockTSE : if the key is tombstoned or expired less (by $checkKeys) + * - lockTSE : if the key is tombstoned or expired (by $checkKeys) less * than this many seconds ago, then try to have a single * thread handle cache regeneration at any given time. * Other threads will try to use stale values if possible. + * If, on miss, the time since expiration is low, the assumption + * is that the key is hot and that a stampede is worth avoiding. * - tempTTL : when 'lockTSE' is set, this determines the TTL of the temp * key used to cache values while a key is tombstoned. * This avoids excessive regeneration of hot keys on delete() but -- 2.20.1