From: daniel Date: Mon, 11 Feb 2013 19:40:12 +0000 (+0100) Subject: Set timeout for Sites object in memcached. X-Git-Tag: 1.31.0-rc.0~20722^2 X-Git-Url: http://git.cyclocoop.org/%22.htmlspecialchars%28%24url_syndic%29.%22?a=commitdiff_plain;h=fe6498d7d2c926a3cf7d907a743ba8bb881351a3;p=lhc%2Fweb%2Fwiklou.git Set timeout for Sites object in memcached. Change-Id: I8964a03c5989b368e0da07b42db463cf6e732fb3 --- diff --git a/includes/site/SiteSQLStore.php b/includes/site/SiteSQLStore.php index c46205736e..412380550f 100644 --- a/includes/site/SiteSQLStore.php +++ b/includes/site/SiteSQLStore.php @@ -47,6 +47,11 @@ class SiteSQLStore implements SiteStore { */ private $cacheKey = null; + /** + * @var int + */ + private $cacheTimeout = 3600; + /** * @since 1.21 * @@ -218,7 +223,7 @@ class SiteSQLStore implements SiteStore { } $cache = wfGetMainCache(); - $cache->set( $this->getCacheKey(), $this->sites ); + $cache->set( $this->getCacheKey(), $this->sites, $this->cacheTimeout ); wfProfileOut( __METHOD__ ); }