Assign in prefilter

From: Date: Thu, 21 Mar 2002 22:57:39 +0000
Subject: Assign in prefilter
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3262@lists.php.net to get a copy of this message
Found a problem when assigning vars in a prefilter. (using the modified version of Smarty.class.php) If using cache, when the cache expires or is cleared with $smarty->clear_all_cache(); and no recompile is done! The prefilter is not run and the assigned vars is missing in the output! Can this be fixed somehow? Thanks! Andreas -----Ursprungligt meddelande----- Från: Peter Bowyer [mailto:reywob@f2s.com] Skickat: den 21 mars 2002 19:26 Till: smarty@lists.ispi.net Ämne: [smarty] RE: Smarty with vBulletin? At 11:58 AM 3/21/02 -0500, Matt Rogish wrote: >Since the template table is hit on every page the chances are close to 100% >that all the templates for each page are cached in the database's data >cache. This means templates are pulled from the database server's memory >instead of the web server's disk. So combining the Zend Cache (or whatever >cache) and a DB would result in very few, if any, disk reads on a page view >(our images live on Akamai so we don't worry about serving images either). But it would still result in every database query being executed. Sure, the database results may be held in memory, but that's the same with any frequently accessed files. Using something like smarty with the PHP Accelerator <http://www.php-accelerator.co.uk> would result in just as low a number of disk reads, as the compiled templates would be cached in shm. >Another advantage is that most people do daily database backups whereas you >don't really backup your PHP files all that often (once is generally enough >since they don't change at all) so the likelihood of having to re-do your >templates after a crash are lessened. Of course, templates don't change >that often either but it's nice to not have to worry about backing up two >things (although our web boxen are tape-backuped anyway). If you're going to need the data secure should the server crash then everything should be backed up, not just the database. Regards, Peter. -- Maple Design - quality web design and programming http://www.mapledesign.co.uk --- You are currently subscribed to smarty as: andreas.heintze@home.se To unsubscribe send a blank email to $subst('Email.Unsub') Visit Smarty's homepage at http://www.phpinsider.com/php/code/Smarty/

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