RE: Smarty with vBulletin?

From: Date: Thu, 21 Mar 2002 18:25:53 +0000
Subject: RE: Smarty with vBulletin?
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3230@lists.php.net to get a copy of this message
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

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