From: Ævar Arnfjörð Bjarmason Date: Fri, 9 Sep 2005 21:11:46 +0000 (+0000) Subject: * Set the memcache expiry time to a week instead of infinite X-Git-Tag: 1.6.0~1686 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=3b07f5c72c60c3a0e3c4d38125876dc0f106adb9;p=lhc%2Fweb%2Fwiklou.git * Set the memcache expiry time to a week instead of infinite * Run $this->purgeCache(); on action=purge --- diff --git a/includes/Image.php b/includes/Image.php index 87f2744669..e162807878 100644 --- a/includes/Image.php +++ b/includes/Image.php @@ -195,7 +195,7 @@ class Image 'metadata' => $this->metadata, 'size' => $this->size ); - $wgMemc->set( $keys[0], $cachedValues ); + $wgMemc->set( $keys[0], $cachedValues, 60 * 60 * 24 * 7 ); // A week } else { // However we should clear them, so they aren't leftover // if we've deleted the file. @@ -1450,6 +1450,7 @@ class Image $newver = Exif::version(); if ( !count( $ret ) || $purge || $oldver != $newver ) { + $this->purgeCache(); $this->updateExifData( $newver ); } if ( isset( $ret['MEDIAWIKI_EXIF_VERSION'] ) )