Small Problem with caching
| From: | Michael Caplan | Date: | Fri, 14 Dec 2001 04:47:23 +0000 |
| Subject: | Small Problem with caching | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-2288@lists.php.net to get a copy of this message | ||
Hi folks,
I am having some difficulty with caching with Smarty 1.51. I am hoping that
someone could help me troubleshoot this. For whatever reason, smarty
insists on issuing a warning when checking to see if a template is cached
(regardless if error reporting is set to 0):
Warning
fopen("./cache/a8/a837e143376b2a5fc3386ada942bdca4/7469a286259799e5b37e5db92
96f00b3.php", "r") - No such file or directory occurred in C:\My
Documents\web\smarty\Smarty.class.php on 1187 at Thu Dec 13 23:30:48 Eastern
Standard Time 2001
For what it is worth, here is a snippet of my code:
------------------------------------
$template = "/path/to/template.tpl";
$id = "some var";
$template_body = New Smarty;
$template_body->caching = true;
error_reporting(0);
if(!$template_body->is_cached("file:$template", $id)) {
// no cache
}
$template_body->display("file:$template", $id);
-----------------------------------------------
Shouldn't these warnings be suppressed since I have specifically turned off
error reporting?
Thanks,
Michael Caplan
Institute for Social Ecology
http://www.social-ecology.org/