Exemple #1
0
	/**
	 * Purge the shared history (OldLocalFile) cache.
	 *
	 * @note This used to purge old thumbnails as well.
	 */
	function purgeHistory() {
		global $wgMemc;

		$hashedName = md5( $this->getName() );
		$oldKey = $this->repo->getSharedCacheKey( 'oldfile', $hashedName );

		if ( $oldKey ) {
			$wgMemc->delete( $oldKey );
		}
	}
 /**
  * Purge the shared history (OldLocalFile) cache
  */
 function purgeHistory()
 {
     global $wgMemc;
     $hashedName = md5($this->getName());
     $oldKey = $this->repo->getSharedCacheKey('oldfile', $hashedName);
     // Must purge thumbnails for old versions too! bug 30192
     foreach ($this->getHistory() as $oldFile) {
         $oldFile->purgeThumbnails();
     }
     if ($oldKey) {
         $wgMemc->delete($oldKey);
     }
 }