RE: Small Problem with caching
| From: | Michael Caplan | Date: | Fri, 14 Dec 2001 18:37:18 +0000 |
| Subject: | RE: Small Problem with caching | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2309@lists.php.net to get a copy of this message | ||
I answered my own question. FYI, the problem had nothing to do with Smarty
but my custom error handler. It was processing all error reports regardless
of the '@'. A quick scan for error_reporting() == 0 fixed this.
Sorry for my previous msg.
Regards,
Michael
-----Original Message-----
From: Michael Caplan [mailto:dialectics-unlimited@sympatico.ca]
Sent: December 13, 2001 11:47 PM
To: smarty@lists.ispi.net
Subject: Small Problem with caching
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/