From 21a56a078251cd7305daf7bce1cef540e8c220f0 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Thu, 3 Jul 2008 18:37:31 +0000 Subject: [PATCH] Don't use $wgTranscludeCacheExpiry, as it's not designed for this. Make new configuration setting for $wgForeignFileRepos instead called 'localCacheExpiry'. --- includes/filerepo/File.php | 2 +- includes/filerepo/FileRepo.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/filerepo/File.php b/includes/filerepo/File.php index 169ae86884..07a77011fb 100644 --- a/includes/filerepo/File.php +++ b/includes/filerepo/File.php @@ -1080,7 +1080,7 @@ abstract class File { } wfDebug( "Fetching shared description from $renderUrl\n" ); $res = Http::get( $renderUrl ); - if ( $res && $this->repo->useLocalCache ) $wgMemc->set( $key, $res, time() + $wgTranscludeCacheExpiry ); + if ( $res && $this->repo->useLocalCache ) $wgMemc->set( $key, $res, $this->repo->localCacheExpiry ); return $res; } else { return false; diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php index ca79685b2d..b6318d612a 100644 --- a/includes/filerepo/FileRepo.php +++ b/includes/filerepo/FileRepo.php @@ -30,7 +30,8 @@ abstract class FileRepo { // Optional settings $this->initialCapital = true; // by default foreach ( array( 'descBaseUrl', 'scriptDirUrl', 'articleUrl', 'fetchDescription', - 'thumbScriptUrl', 'initialCapital', 'pathDisclosureProtection', 'useLocalCache' ) as $var ) + 'thumbScriptUrl', 'initialCapital', 'pathDisclosureProtection', + 'useLocalCache', 'localCacheExpiry' ) as $var ) { if ( isset( $info[$var] ) ) { $this->$var = $info[$var]; -- 2.20.1