<?php
// $Id: XCube_RenderCache.class.php,v 1.1.2.2 2006/01/06 03:17:48 minahito Exp $

class XCube_RenderCache
{
	var $mCacheId = null;
	var $mResourceName = null;
	
	function XCube_RenderCache()
	{
	}

	/**
	 * @return bool
	 */
	function isCache($cachetime = null)
	{
	}
	
	/**
	 * @return bool
	 */
	function enableCache()
	{
		return true;
	}
	
	function setResourceName($name)
	{
		$this->mResourceName = $name;
	}
	
	/**
	 * @return string
	 */
	function getCacheId()
	{
	}
	
	/**
	 * @return string
	 */
	function _getFileName()
	{
	}

	function save($renderTarget)
	{
		if ($this->enableCache()) {
			$filename = $this->_getFileName();
			$fp = fopen($filename, "wb");
			fwrite($fp, $renderTarget->getResult());
			fclose($fp);
		}
	}

	function load()
	{
		if ($this->isCache()) {
			return file_get_contents($this->_getFileName());
		}
	}
	
	function clear()
	{
	}
	
	function reset()
	{
		$this->mResourceName = null;
	}
}


?>