Don't use $wgTranscludeCacheExpiry, as it's not designed for this. Make new configura...
authorChad Horohoe <demon@users.mediawiki.org>
Thu, 3 Jul 2008 18:37:31 +0000 (18:37 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Thu, 3 Jul 2008 18:37:31 +0000 (18:37 +0000)
includes/filerepo/File.php
includes/filerepo/FileRepo.php

index 169ae86..07a7701 100644 (file)
@@ -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;
index ca79685..b6318d6 100644 (file)
@@ -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];