r99106 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99105‎ | r99106 | r99107 >
Date:14:07, 6 October 2011
Author:catrope
Status:ok
Tags:
Comment:
Per Domas, reinstate <1e9 check that was dropped in r94199. Also document what these checks are all about in more detail.
Modified paths:
  • /trunk/phase3/includes/objectcache/MemcachedClient.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/objectcache/MemcachedClient.php
@@ -959,9 +959,12 @@
960960 $this->stats[$cmd] = 1;
961961 }
962962
963 - // Memcached doesn't seem to handle very high TTL values very well,
964 - // so clamp them at 30 days
965 - if ( $exp > 2592000 ) {
 963+ // TTLs higher than 30 days will be detected as absolute TTLs
 964+ // (UNIX timestamps), and will result in the cache entry being
 965+ // discarded immediately because the expiry is in the past.
 966+ // Clamp expiries >30d at 30d, unless they're >=1e9 in which
 967+ // case they are likely to really be absolute (1e9 = 2011-09-09)
 968+ if ( $exp > 2592000 && $exp < 1000000000 ) {
966969 $exp = 2592000;
967970 }
968971

Follow-up revisions

RevisionCommit summaryAuthorDate
r991071.18wmf1: MFT r99106`catrope14:09, 6 October 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r94199Merge r93797 to trunk, in a somewhat modified form: clamp expiries for memcac...catrope21:15, 10 August 2011

Status & tagging log