Re: [SMARTY-DEV] Templates not getting recompiled

From: Date: Tue, 29 Oct 2002 15:13:29 +0000
Subject: Re: [SMARTY-DEV] Templates not getting recompiled
References: 1 2  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-304@lists.php.net to get a copy of this message
On Tue, 2002-10-29 at 09:22, Monte Ohrt wrote: > Does this behavior sound like it would be a problem for any situation? I don't think so, as this makes the test more accurate. Ideally, you would be put the mtime of the source file in the compiled file, but this means you have to stat the compiled file for existence, open it, and then read the source mtime, which is a very expensive procedure compared to stat(). When it comes right down to it, Smarty should not really care about when the template was compiled, what is should care about is whether the current template source is different from the source that the current compiled version represents. I think that this change should work in all cases. The only issue I can think of is that touch() might not work on some platform. I don't know of any platforms which don't support touch, so I don't think this will be a problem. Worst case, touch fails and you get the current behavior. Thanks. Peter > On Mon, 2002-10-28 at 22:42, Peter Bowen wrote: > > The attached patch fixes this by setting the mtime of the compiled > > version to the mtime of the original file.

« previous php.smarty.dev (#304) next »