From: Aaron Schulz Date: Wed, 15 Jun 2016 01:25:36 +0000 (-0700) Subject: Deprecate Parser::disableCache X-Git-Tag: 1.31.0-rc.0~6580^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/categories/supprimer.php?a=commitdiff_plain;h=7d42e96748015a3950168c8e3794743d4f03a710;p=lhc%2Fweb%2Fwiklou.git Deprecate Parser::disableCache Few maintained extensions still rely on this and it is bad practice to use this for handling cache correctness. Change-Id: I2de481198bbff5c4f3dd81fc6d1b137e4c37b93f --- diff --git a/includes/parser/CacheTime.php b/includes/parser/CacheTime.php index 2451390dc2..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 ) { diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 6c84623ffe..01f6b804ad 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -5302,6 +5302,7 @@ class Parser { /** * Set a flag in the output object indicating that the content is dynamic and * shouldn't be cached. + * @deprecated since 1.28; use getOutput()->updateCacheExpiry() */ public function disableCache() { wfDebug( "Parser output marked as uncacheable.\n" );