[xoops-cvslog 5369] CVS update: xoops2jp/html/modules/legacy/kernel

Back to archive index

Minahito minah****@users*****
2006年 10月 17日 (火) 00:11:41 JST


Index: xoops2jp/html/modules/legacy/kernel/Legacy_CacheInformation.class.php
diff -u xoops2jp/html/modules/legacy/kernel/Legacy_CacheInformation.class.php:1.1.2.1 xoops2jp/html/modules/legacy/kernel/Legacy_CacheInformation.class.php:1.1.2.2
--- xoops2jp/html/modules/legacy/kernel/Legacy_CacheInformation.class.php:1.1.2.1	Sat Oct 14 23:55:24 2006
+++ xoops2jp/html/modules/legacy/kernel/Legacy_CacheInformation.class.php	Tue Oct 17 00:11:41 2006
@@ -91,6 +91,10 @@
 		$this->mGroupArr = array();
 		$this->_mEnableCache = null;
 	}
+	
+	function getCacheFilePath()
+	{
+	}
 }
 
 class Legacy_ModuleCacheInformation extends Legacy_AbstractCacheInformation
@@ -127,6 +131,24 @@
 		$this->mModule = null;
 		$this->mURL = null;
 	}
+	
+	/**
+	 * Gets a file path of a cache file for module contents.
+	 * @param Legacy_ModuleCacheInformation $cacheInfo
+	 * @return string
+	 */
+	function getCacheFilePath()
+	{
+		$filepath = null;
+//		$this->mGetModuleCacheFilePath->call(new XCube_Ref($filepath), $cacheInfo);
+		
+		if (!$filepath) {
+			$id = md5(XOOPS_SALT . $this->mURL . "(" . implode("_", $this->mIdentityArr) . ")" . implode("_", $this->mGroupArr));
+			$filepath = XOOPS_CACHE_PATH . "/" . $id . ".cache.html";
+		}
+		
+		return $filepath;
+	}
 }
 
 class Legacy_BlockCacheInformation extends Legacy_AbstractCacheInformation
@@ -154,6 +176,24 @@
 		 parent::reset();
 		 $this->mBlock = null;
 	 }
+
+	/**
+	 * Gets a file path of a cache file for module contents.
+	 * @param Legacy_BlockCacheInformation $cacheInfo
+	 * @return string
+	 */
+	function getCacheFilePath()
+	{
+		$filepath = null;
+//		$this->mGetBlockCacheFilePath->call(new XCube_Ref($filepath), $cacheInfo);
+		
+		if (!$filepath) {
+			$id = md5(XOOPS_SALT . $this->mBlock->get('bid') . "(" . implode("_", $this->mIdentityArr) . ")" . implode("_", $this->mGroupArr));
+			$filepath = XOOPS_CACHE_PATH . "/" . $id . ".cache.html";
+		}
+		
+		return $filepath;
+	}
 }
 
 ?>
\ No newline at end of file


xoops-cvslog メーリングリストの案内
Back to archive index