|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
mje113 Smarty n00b
Joined: 12 Nov 2003 Posts: 1
|
Posted: Wed Nov 12, 2003 5:54 pm Post subject: cache confusion |
|
|
Ok, I understand the concept of compiled templates... it makes sense as to how it can speed up execution times.
I also understand the concept behind the cache, as it also should speed up execution time. What I don't understand is how exactly it happens (and is it actually happening at all).
So far (and I'm new to this), most of my code structure is as follows:
--index.php--
Code: | <?php
require('Smarty.class.php');
$smarty = new Smarty;
// do a bunch of SQL queries and operations on returned data
$smarty->assign('data','returned data');
$smarty->display('index.tpl');
?> |
--index.tpl--
So, everytime someone visits index.php, all of my queries and operations on that data are going to happen before Smarty takes over and displays (possibly the cache) the template... right? So how is a cache file speeding things up?
Thanks a bunch. |
|
Back to top |
|
Troublegum Smarty Rookie
Joined: 07 Sep 2003 Posts: 33 Location: Germany
|
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
|
Back to top |
|
|
|
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
|