Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Smarty 3 compiling/caching issues

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty 3
View previous topic :: View next topic  
Author Message
stunz
Smarty n00b


Joined: 04 Aug 2005
Posts: 4
Location: New Zealand

PostPosted: Sat Nov 07, 2009 10:57 pm    Post subject: Smarty 3 compiling/caching issues Reply with quote

Hi All,

I'm trying out Smarty 3. I haven't used Smarty since around 2006, so I'm getting back into it, and my knowledge is a bit rusty.

I've tried with compile_check and force_compile enabled, but I can't get consistent pages. The main page has header and footer includes, and the footer alternates with it's previous different version. For example, it was:

Copyright 2009

I changed to:

© Copyright 2009

successive refreshes of the page givesL

Copyright 2009
© Copyright 2009
Copyright 2009
© Copyright 2009
Copyright 2009
© Copyright 2009

and it's regular like clockwork.

If I disable compile_check it works. If I make another change to the template however, I have to manually delete the compiled templates, refresh the page, sometimes that works, other times I have to repeat a few times for a fresh template.

If I check the compiled template script, the changes are in there, so Smarty seems to be displaying old versions from somewhere. Caching is disabled in Smarty.

Any variables assigned through the page change okay, so it's not page caching.

One thing I've noticed is that the compiled scripts are inheriting the timestamp of the .tpl on the file stat, I thought that they should be the time they're compiled? I suspect this could be it. For example:

Code:

-rw-r--r-- 1 www-data www-data 3464 2009-11-08 08:24 108687273.file.index.tpl.php
-rw-r--r-- 1 www-data www-data  815 2009-10-18 14:56 135052920.file.header.tpl.php
-rw-r--r-- 1 www-data www-data 5582 2009-11-07 16:28 2051494208.file.debug.tpl.php
-rw-r--r-- 1 www-data www-data 1069 2009-11-08 08:37 239105369.file.footer.tpl.php


So they were all generated before, but the timestamps are all wrong.

I'm using XCache, and suspect that could be causing it, and if the timestamps above were the time it was compiled, it may stop.

Any ideas on what it could be, or how to stop the timestamp getting modified? I'm using SVN Beta revision 3316.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Smarty 3 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP