From: <sy...@us...> - 2003-10-01 13:17:19
|
Update of /cvsroot/tikiwiki/tiki In directory sc8-pr-cvs1:/tmp/cvs-serv9280 Modified Files: Tag: release_eta_carinea_rc1 tiki-modules.php Log Message: To improve the performance : each time a non cached module is accessed, the cache file doesn't need to be written on disk Index: tiki-modules.php =================================================================== RCS file: /cvsroot/tikiwiki/tiki/tiki-modules.php,v retrieving revision 1.11.2.2 retrieving revision 1.11.2.3 diff -u -d -r1.11.2.2 -r1.11.2.3 --- tiki-modules.php 30 Jul 2003 19:14:39 -0000 1.11.2.2 +++ tiki-modules.php 1 Oct 2003 13:17:15 -0000 1.11.2.3 @@ -82,9 +82,11 @@ } } $r["data"] = $data; - $fp = fopen($cachefile,"w+"); - fwrite($fp,$data,strlen($data)); - fclose($fp); + if (!file_exists($nocache)) { + $fp = fopen($cachefile,"w+"); + fwrite($fp,$data,strlen($data)); + fclose($fp); + } } else { //print("Usando cache<br/>"); $fp = fopen($cachefile,"r"); @@ -148,9 +150,11 @@ } } $r["data"] = $data; - $fp = fopen($cachefile,"w+"); - fwrite($fp,$data,strlen($data)); - fclose($fp); + if (!file_exists($nocache)) { + $fp = fopen($cachefile,"w+"); + fwrite($fp,$data,strlen($data)); + fclose($fp); + } } else { //print("Usando cache<br/>"); $fp = fopen($cachefile,"r"); |