Re: [SMARTY] Re: [SMARTY-DEV] SV: [SMARTY] RC2 released

From: Date: Thu, 27 Mar 2003 14:26:00 +0000
Subject: Re: [SMARTY] Re: [SMARTY-DEV] SV: [SMARTY] RC2 released
References: 1 2 3 4 5 6  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8942@lists.php.net to get a copy of this message
Pete Morganic wrote: > The real issue here is that the smarty installation cannot detect > which version the templates are. > > What would happen if the Smarty templates_c directory had > one file that recorded the current version. If that changed > then the clear_compiled and clear_configs would be trigerred. Unless I'm missing your point, that's precisely what my posted code does... Suppose you are running Smarty 2.4.0 for the first time. The file smarty-release-2.4.0 will not exist in the compiled templates directory (eg templates_c), so clear_compiled and clear_all_cache (and clear_configs if you modify the code I posted) would be called. The smarty-release-2.4.0 file would then be created, preventing the clearout taking place next time a page is displayed. Then suppose you upgrade to Smarty 2.4.1. Now the file being looked for is smarty-release-2.4.1, which is not there, so the old files get deleted and smarty-release-2.4.1 gets created to allow the new (clean) cache to build up. The version change detection is completely automatic. Mark Rogers, Quarella (More Solutions) Ltd

« previous php.smarty.general (#8942) next »