Re: [SMARTY] compile all templates at once

From: Date: Mon, 16 Aug 2004 14:20:24 +0000
Subject: Re: [SMARTY] compile all templates at once
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-11688@lists.php.net to get a copy of this message
On 8/14/04 4:56 AM, "messju mohr" <messju@lammfellpuschen.de> wrote: > On Sat, Aug 14, 2004 at 10:24:44AM +0300, Maris wrote: >> Hi, >> >> 1) is there a way to tell Smarty to compile all templates >> from smarty/templates to smarty/compile without clicking >> through all www pages and waiting till all templates have >> been visited and compiled? > > write a script that searches through $smarty->template_dir and call > $smarty->fetch() for each template found. This will work just fine for templates that are not influenced by GET or POST requests. But, for GET/POST "pre-caching/pre-compiling" you should look at a tool like curl or better, wget. I usually just kick off a wget crawl using a user:pass combo and the client's site gets compiled and cached. check out the wiki for more info: http://smarty.incutio.com/?page=CacheAndCompile cheers, dan >> 2) Since templates are compiled they can be encoded with >> Zend and posted to clients server. Is there any Smarty setting that >> should be reset to zero to avoid template recompilation after some >> X days? In other words - how to make sure that templates >> are not being tried to recompile after some period of time? > > $smarty->compile_check = false; > >> Thanks, >> Maris > > wbr > messju

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