Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Dedicated server web hosting provided by Guru-host.eu.
difference between compile and cache?

 
Post new topic   Reply to topic    Smarty Forum Index -> Smarty Development
View previous topic :: View next topic  
Author Message
g00fy
Smarty Rookie


Joined: 07 Dec 2005
Posts: 19

PostPosted: Sat Feb 27, 2010 11:47 am    Post subject: difference between compile and cache? Reply with quote

What is exactly the difference between compiling and caching?


Thanks
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 4186
Location: Hamburg / Germany

PostPosted: Sat Feb 27, 2010 12:10 pm    Post subject: Reply with quote

The template source is being compiled into PHP code. Normally this is done automatically once each time after the template was modified unless you disable automatic compiling with compile_check = false (can be used increase speed, when the templates are stable) or force_compile = true which will force compiling each time the page is called.

The compiled template does render the final HTML output which gets displayed. If you enable caching the HTML output gets cached and is used for output until the cache_lifetime expires.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Smarty Development 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