Minahito
minah****@users*****
2006年 1月 6日 (金) 12:17:48 JST
Index: xoops2jp/html/kernel/XCube_RenderCache.class.php diff -u xoops2jp/html/kernel/XCube_RenderCache.class.php:1.1.2.1 xoops2jp/html/kernel/XCube_RenderCache.class.php:1.1.2.2 --- xoops2jp/html/kernel/XCube_RenderCache.class.php:1.1.2.1 Thu Jan 5 17:26:23 2006 +++ xoops2jp/html/kernel/XCube_RenderCache.class.php Fri Jan 6 12:17:48 2006 @@ -1,5 +1,5 @@ <?php -// $Id: XCube_RenderCache.class.php,v 1.1.2.1 2006/01/05 08:26:23 minahito Exp $ +// $Id: XCube_RenderCache.class.php,v 1.1.2.2 2006/01/06 03:17:48 minahito Exp $ class XCube_RenderCache { @@ -17,6 +17,14 @@ { } + /** + * @return bool + */ + function enableCache() + { + return true; + } + function setResourceName($name) { $this->mResourceName = $name; @@ -38,10 +46,12 @@ function save($renderTarget) { - $filename = $this->_getFileName(); - $fp = fopen($filename, "wb"); - fwrite($fp, $renderTarget->getResult()); - fclose($fp); + if ($this->enableCache()) { + $filename = $this->_getFileName(); + $fp = fopen($filename, "wb"); + fwrite($fp, $renderTarget->getResult()); + fclose($fp); + } } function load()