Set timeout for Sites object in memcached.
authordaniel <daniel.kinzler@wikimedia.de>
Mon, 11 Feb 2013 19:40:12 +0000 (20:40 +0100)
committerdaniel <daniel.kinzler@wikimedia.de>
Mon, 11 Feb 2013 19:40:12 +0000 (20:40 +0100)
Change-Id: I8964a03c5989b368e0da07b42db463cf6e732fb3

includes/site/SiteSQLStore.php

index c462057..4123805 100644 (file)
@@ -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__ );
        }