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

Requirment to clear compiled templates when upgading Smarty

 
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 Development
View previous topic :: View next topic  
Author Message
jarofgreen
Smarty Rookie


Joined: 09 Jul 2010
Posts: 14

PostPosted: Mon Mar 12, 2012 12:39 pm    Post subject: Requirment to clear compiled templates when upgading Smarty Reply with quote

Can we remove this?
It would make upgrading easier and remove a persistent support question.

Complied Template filenames are currently

<MD5>.file.<TemplateFileName>.php

could they became

<MD5>.<Smarty version>.file.<TemplateFileName>.php

So that when you upgrade to a new version of smarty, it sees the templates as not compiled and compiles new versions for you?
That way, you don't get any software crashes if you forget to delete the compiled templates!
Back to top
View user's profile Send private message
rodneyrehm
Administrator


Joined: 30 Mar 2007
Posts: 674
Location: Germany, border to Switzerland

PostPosted: Mon Mar 12, 2012 12:55 pm    Post subject: Reply with quote

Smarty 3.1 (RC1, actually) introduced »automatic recompilation at version change« on February 12th 2011.

Adding the version to the filename would leave orphaned files in your cache/compile directories. Smarty 3.1.x adds the version to the meta info stored along compiled/cached templates, which are compared on evaluation.
_________________
Twitter
Back to top
View user's profile Send private message Visit poster's website
jarofgreen
Smarty Rookie


Joined: 09 Jul 2010
Posts: 14

PostPosted: Mon Mar 12, 2012 1:28 pm    Post subject: Reply with quote

Personally, I see orphaned files as much less of a problem than a crash.
And in any case, if the version number is clearly in the file name it's easy for a sysadmin to come along and delete any files for old versions of smarty.
But glad to hear it's been fixed, either way.
Thanks.
Back to top
View user's profile Send private message
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 Development 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