Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/393516 )

Change subject: objectcache: add more comments to WANObjectCache 
getWithSetCallback()
......................................................................

objectcache: add more comments to WANObjectCache getWithSetCallback()

Change-Id: I567f45fa7b33226b0ccf7d80440802eab71ff753
---
M includes/libs/objectcache/WANObjectCache.php
1 file changed, 7 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/16/393516/1

diff --git a/includes/libs/objectcache/WANObjectCache.php 
b/includes/libs/objectcache/WANObjectCache.php
index e63b32e..d6a850e 100644
--- a/includes/libs/objectcache/WANObjectCache.php
+++ b/includes/libs/objectcache/WANObjectCache.php
@@ -857,14 +857,16 @@
         *      Default: WANObjectCache::MIN_TIMESTAMP_NONE.
         *   - hotTTR: Expected time-till-refresh (TTR) for keys that average 
~1 hit/second (1 Hz).
         *      Keys with a hit rate higher than 1Hz will refresh sooner than 
this TTR and vise versa.
-        *      Such refreshes won't happen until keys are "ageNew" seconds 
old. The TTR is useful at
-        *      reducing the impact of missed cache purges, since the effect of 
a heavily referenced
-        *      key being stale is worse than that of a rarely referenced key. 
Unlike simply lowering
-        *      $ttl, seldomly used keys are largely unaffected by this option, 
which makes it possible
-        *      to have a high hit rate for the "long-tail" of less-used keys.
+        *      Such refreshes won't happen until keys are "ageNew" seconds 
old. This also uses
+        *      randomization to avoid triggering stampedes. The TTR is useful 
at reducing the impact
+        *      of missed cache purges, since the effect of a heavily 
referenced key being stale is
+        *      worse than that of a rarely referenced key. Unlike simply 
lowering $ttl, seldomly
+        *      used keys are largely unaffected by this option, which makes it 
possible to have a
+        *      high hit rate for the "long-tail" of less-used keys.
         *      Default: WANObjectCache::HOT_TTR.
         *   - lowTTL: Consider pre-emptive updates when the current TTL 
(seconds) of the key is less
         *      than this. It becomes more likely over time, becoming certain 
once the key is expired.
+        *      This helps avoid stampedes that might be triggered due to the 
key expiring.
         *      Default: WANObjectCache::LOW_TTL.
         *   - ageNew: Consider popularity refreshes only once a key reaches 
this age in seconds.
         *      Default: WANObjectCache::AGE_NEW.

-- 
To view, visit https://gerrit.wikimedia.org/r/393516
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I567f45fa7b33226b0ccf7d80440802eab71ff753
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to