Index: trunk/phase3/includes/objectcache/MemcachedClient.php |
— | — | @@ -959,9 +959,12 @@ |
960 | 960 | $this->stats[$cmd] = 1; |
961 | 961 | } |
962 | 962 | |
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 ) { |
966 | 969 | $exp = 2592000; |
967 | 970 | } |
968 | 971 | |