X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fparser%2FCacheTime.php;h=05bcebef64cd6e3a9da3761b3a2bb18abc9a9eed;hb=962529515d74517bd936bcb4546cecb5d28cdd91;hp=7acfe38cfca2a1f14a17e7ca52e9f1b54f20bc70;hpb=638c4528259b71a5bc90439fad7cd8d110a86b06;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/parser/CacheTime.php b/includes/parser/CacheTime.php index 7acfe38cfc..05bcebef64 100644 --- a/includes/parser/CacheTime.php +++ b/includes/parser/CacheTime.php @@ -79,12 +79,15 @@ class CacheTime { /** * Sets the number of seconds after which this object should expire. + * * This value is used with the ParserCache. * If called with a value greater than the value provided at any previous call, * the new call has no effect. The value returned by getCacheExpiry is smaller * or equal to the smallest number that was provided as an argument to * updateCacheExpiry(). * + * Avoid using 0 if at all possible. Consider JavaScript for highly dynamic content. + * * @param int $seconds */ public function updateCacheExpiry( $seconds ) { @@ -93,11 +96,6 @@ class CacheTime { if ( $this->mCacheExpiry === null || $this->mCacheExpiry > $seconds ) { $this->mCacheExpiry = $seconds; } - - // hack: set old-style marker for uncacheable entries. - if ( $this->mCacheExpiry !== null && $this->mCacheExpiry <= 0 ) { - $this->mCacheTime = -1; - } } /**