Bill Ward wrote:
On 5/10/07, Travis Basevi <[EMAIL PROTECTED]> wrote:
                 if ($compiled && -f $compiled
                     && (stat($path))[9] <= (stat($compiled))[9]) {

Assuming the .ttc is always set to the mtime of the .tt2 (can't find the
code that does this, but observations suggest this), could the <=
instead be changed to == thus ensuring the compiled version has to match
(or at least have the same mtime) as the tt2 file?

Would that help, though?  The timestamps being equal seems like an
unlikely case.  I think in your situation the derived file would be
newer than the template.

But the .ttc does seem to be set to the exact mtime of the corresponding .tt2. Just now, I had:

/usr/cricinfo/wcms/tt2/engine/match/scorecard_html.inc
2007-05-10 16:00:44.000000000 +0000

/var/cache/tt2/usr/cricinfo/wcms/tt2/engine/match/scorecard_html.inc.ttc
2007-05-10 15:45:25.000000000 +0000

then when accessing the .inc file (sometime after 4pm UTC incidentally), the times became:

/usr/cricinfo/wcms/tt2/engine/match/scorecard_html.inc
2007-05-10 16:00:44.000000000 +0000

/var/cache/tt2/usr/cricinfo/wcms/tt2/engine/match/scorecard_html.inc.ttc
2007-05-10 16:00:44.000000000 +0000

How about an option to disable the timestamp check and unconditionally
do the conversion?

Wouldn't that defeat the entire purpose of having a compiled cached version? Or am I completely confused? (The smart money is on the latter)

:Travis

_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to