NYCPHP Meetup

NYPHP.org

[nycphp-talk] caching queries

Jayesh Sheth jayeshsh at ceruleansky.com
Mon Apr 4 17:14:34 EDT 2005


Hi Rahmin,

I think the Smarty templating system ( http://smarty.php.net ) lets you 
use selective HTML caching (not to be confused with Smarty template 
compilation).
I googled a bit, and found this article:

http://revjim.net/comments/10170/

The comments section has the following useful information:

 "Posted by Monte

A note on Smarty caching at the template-level vs. caching at the 
application-level: one huge advantage of Smarty's caching is the ability 
to make parts of the page non-cached via {insert} tags or block 
functions registered as non-cachable. This way you can easily embed 
"live" content such as weather bugs, banner ads, user feedback, etc. 
Example, you can keep a page cached indefinately while allowing embedded 
user feedback to grow. This isn't too feasible with application-level 
caching without a lot of extra legwork from the application programmer."

 "Posted by Paul M. Jones
[...]
I would argue this is a feature or failure of a particular caching 
system, not of a template system. While not trivial, it is not a 
difficult exercise to add that kind of feature to an app-level caching 
system, e.g. Cache_Lite; I have done so myself with some my non-public 
tools. [...] "

Btw, David Sklar's PHP Tools Book ( http://tinyurl.com/5h2e9 ) has a 
good overview of Smarty.

Hope that helps.

- Jay Sheth






More information about the talk mailing list