Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

difference beween template_c and cache and other issues

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
sideshow
Smarty n00b


Joined: 13 Aug 2003
Posts: 2

PostPosted: Wed Aug 13, 2003 2:48 am    Post subject: difference beween template_c and cache and other issues Reply with quote

What is the difference between the two? As far as I can tell they are the same thing.

Also, I have a website where my users can choose different templates for their part of the site, I have a central template directory and each user has it's own cache, and template_c directoy. Right now I have cache off but if the user changes templates Smarty shows the old template, unless I go and delete the contents of template_c. Do I need to delete the contents of template_c everytime a user changes templates?
Back to top
View user's profile Send private message
AZTEK
Smarty Pro


Joined: 16 Apr 2003
Posts: 235
Location: Purdue University

PostPosted: Wed Aug 13, 2003 2:57 am    Post subject: Reply with quote

Ok look at it this way you have your templates in your templates folder these are in the smarty format. Now when you display() a template it cant just get show it has to get converted into something PHP can use so its compiled. Now to save time a template is compiled once and stuck in the template_c folder that way its only done when the template is changed. This compiled file (look at one some time) still has variables where your assigns will go in, and calls to php functions where the modifiers, etc are. A cached output is what is sent to your browser this is what a template looks like after the assigns filled in, run through the modifiers, blocks, functions, etc.
_________________
"Imagine a school with children that can read and write, but with teachers who cannot, and you have a metaphor of the Information Age in which we live." -Peter Cochrane
Back to top
View user's profile Send private message Visit poster's website
sideshow
Smarty n00b


Joined: 13 Aug 2003
Posts: 2

PostPosted: Wed Aug 13, 2003 3:08 am    Post subject: Reply with quote

Ahh, I think the problem is that every template has a file named home.tpl. Would that make Smarty think that every home.tpl was the same file?
Back to top
View user's profile Send private message
AZTEK
Smarty Pro


Joined: 16 Apr 2003
Posts: 235
Location: Purdue University

PostPosted: Wed Aug 13, 2003 3:10 am    Post subject: Reply with quote

It might if they share a common compiled dir
_________________
"Imagine a school with children that can read and write, but with teachers who cannot, and you have a metaphor of the Information Age in which we live." -Peter Cochrane
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP