From: jenkins-bot Date: Fri, 13 Dec 2013 15:51:15 +0000 (+0000) Subject: Merge "Made RepoGroup use ProcessCacheLRU" X-Git-Tag: 1.31.0-rc.0~17652 X-Git-Url: http://git.cyclocoop.org/data/Fool?a=commitdiff_plain;h=12cc7a6791128386e809721ce6120ea8282c0589;p=lhc%2Fweb%2Fwiklou.git Merge "Made RepoGroup use ProcessCacheLRU" --- 12cc7a6791128386e809721ce6120ea8282c0589 diff --cc includes/filerepo/RepoGroup.php index c6e93b622b,039f435bb6..33ab8ae343 --- a/includes/filerepo/RepoGroup.php +++ b/includes/filerepo/RepoGroup.php @@@ -36,13 -35,10 +36,13 @@@ class RepoGroup /** @var bool */ protected $reposInitialised = false; + /** @var array */ protected $localInfo; + + /** @var array */ protected $foreignInfo; - /** @var array */ + /** @var ProcessCacheLRU */ protected $cache; /** @var RepoGroup */ @@@ -453,32 -428,9 +447,9 @@@ } } - /** - * Move a cache entry to the top (such as when accessed) - */ - protected function pingCache( $key ) { - if ( isset( $this->cache[$key] ) ) { - $tmp = $this->cache[$key]; - unset( $this->cache[$key] ); - $this->cache[$key] = $tmp; - } - } - - /** - * Limit cache memory - */ - protected function trimCache() { - while ( count( $this->cache ) >= self::MAX_CACHE_SIZE ) { - reset( $this->cache ); - $key = key( $this->cache ); - wfDebug( __METHOD__ . ": evicting $key\n" ); - unset( $this->cache[$key] ); - } - } - /** * Clear RepoGroup process cache used for finding a file - * @param $title Title|null Title of the file or null to clear all files + * @param Title|null $title Title of the file or null to clear all files */ public function clearCache( Title $title = null ) { if ( $title == null ) {