Re: [SMARTY-DEV] Templates not getting recompiled
| From: | Monte Ohrt | Date: | Tue, 29 Oct 2002 14:22:03 +0000 |
| Subject: | Re: [SMARTY-DEV] Templates not getting recompiled | ||
| References: | 1 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-303@lists.php.net to get a copy of this message | ||
Does this behavior sound like it would be a problem for any situation?
On Mon, 2002-10-28 at 22:42, Peter Bowen wrote:
> I've been using smarty for a few months, and have found it to work
> really well. However, I have seen a situation where a template is
> updated, yet smarty doesn't detect the change and recompile it.
>
> After some research, it turns out the problem is that smarty compares
> the template's mtime to the compiled template's mtime. This works, as
> long at the updated template has a newer mtime than the compiled
> version. This assumes that every time a template is updated, its mtime
> changes to the current time. Unfortunately, in our case, this isn't
> always true.
>
> Our development group writes the software and packages it using RPM.
> Then QA tests it and finally production updates the public servers.
> When the packages are installed, the files have the mtime of when the
> developers last changed the templates, not when they were installed on
> the public servers. This occasionally results in the template mtime
> being older than the latest compile mtime.
>
> The attached patch fixes this by setting the mtime of the compiled
> version to the mtime of the original file.
>
> Thanks.
> Peter
>
>
>
> ______________________________________________________________________
>
> --
> Smarty Development Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
Monte Ohrt <monte@ispi.net>