--help ftw !
[lhc/web/wiklou.git] / includes / CacheManager.php
index e611737..66121de 100644 (file)
@@ -2,6 +2,7 @@
 /**
  * Contain the CacheManager class
  * @package MediaWiki
+ * @subpackage Cache
  */
 
 /**
@@ -33,9 +34,8 @@ class CacheManager {
        function fileCacheName() {
                global $wgFileCacheDirectory, $wgContLang;
                if( !$this->mFileCache ) {
-                       $hash = md5( $key = $this->mTitle->getDbkey() );
-                       if( $this->mTitle->getNamespace() )
-                               $key = $wgContLang->getNsText( $this->mTitle->getNamespace() ) . ":" . $key;
+                       $key = $this->mTitle->getPrefixedDbkey();
+                       $hash = md5( $key );
                        $key = str_replace( '.', '%2E', urlencode( $key ) );
                        
                        $hash1 = substr( $hash, 0, 1 );
@@ -55,7 +55,7 @@ class CacheManager {
        }
        
        function fileCacheTime() {
-               return wfUnix2Timestamp( filemtime( $this->fileCacheName() ) );
+               return wfTimestamp( TS_MW, filemtime( $this->fileCacheName() ) );
        }
        
        function isFileCacheGood( $timestamp ) {