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

Discussion:Smarty cache and opcode of PHP Accelerator

 
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 -> Tips and Tricks
View previous topic :: View next topic  
Author Message
satya61229
Smarty Rookie


Joined: 11 Nov 2006
Posts: 8
Location: India

PostPosted: Mon Nov 20, 2006 1:15 pm    Post subject: Discussion:Smarty cache and opcode of PHP Accelerator Reply with quote

Recently I learnt about smarty and get some know how about the various accelerator.

I come to know eAcclerator get the opcode when first time PHP code runs. And used them after that.
Smarty also saves the page in cache dir.

What is the difference beetween the two cache.
And which one is better.

Thanks
Satya Prakash
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Mon Nov 20, 2006 4:37 pm    Post subject: Reply with quote

PHP opcode caches like eAccelerator speedup PHP pages by short-circuiting the compile phase of PHP scripts. Smarty does a similar thing for its compiled pages but as Smarty simply generates PHP scripts out of templates, these too benefit from a PHP opcode cache. Smarty's caching system is a content cache -- it saves the need to execute a script by storing the result of that execution for future use. At anyrate, these systems work independently and with thoughtful use of both you can (greatly) reduce the load on your servers while increasing response time to your clients.

HTH
Back to top
View user's profile Send private message
satya61229
Smarty Rookie


Joined: 11 Nov 2006
Posts: 8
Location: India

PostPosted: Tue Nov 21, 2006 5:38 am    Post subject: Reply with quote

boots wrote:
PHP opcode caches like eAccelerator speedup PHP pages by short-circuiting the compile phase of PHP scripts. Smarty does a similar thing for its compiled pages but as Smarty simply generates PHP scripts out of templates, these too benefit from a PHP opcode cache. Smarty's caching system is a content cache -- it saves the need to execute a script by storing the result of that execution for future use. At anyrate, these systems work independently and with thoughtful use of both you can (greatly) reduce the load on your servers while increasing response time to your clients.

HTH


Got the point. Smarty cache has nothing to do with the compilation phase caching. It store the script after executing the template (.tpl) and php file.
But PHP caching store the compiled code for further use.

Thank You for this short and very useful reply.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Tue Nov 21, 2006 3:59 pm    Post subject: Reply with quote

erps. I meant *decreasing* response time for your clients -- but I think you got the idea Wink
Back to top
View user's profile Send private message
satya61229
Smarty Rookie


Joined: 11 Nov 2006
Posts: 8
Location: India

PostPosted: Wed Nov 22, 2006 5:17 am    Post subject: Reply with quote

boots wrote:
erps. I meant *decreasing* response time for your clients -- but I think you got the idea Wink


Yes Sir.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
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 -> Tips and Tricks 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