|
You are here: Home / Caching for Better Performance |
Caching for Better PerformancePartial-page cachingSitellite features partial-page caching with the <xt:cache> commands in your XT templates, or by accessing the global $cache object directly. The <xt:cache> tags offer unfortunately little performance improvement in most cases however, since XT still has to parse and loop through the tags between the <xt:cache and </xt:cache> either way. Essentially, this will only see performance improvements when you wrap these tags around content that requires that boost in performance. XT itself is efficient enough that simply caching parts of the template that don't call external applications won't yield much benefit. For example:<xt:cache>In this case, the extra <xt:cache> tags might add more overhead than they're worth, since they add an extra conditional evaluation to the template, and potentially reading and writing to the cache store, which could take more time than a simple loop from 1 to 10. However, in the case of calling an external box, <xt:cache> could yield a noticeable improvement. For example: <xt:cache>Another feature of <xt:cache> is the ability to cache a separate copy for each specific visitor, so that performance is boosted on subsequent page requests from the same visitor. This has the advantage of allowing content to be cacheable that still contains personalized data. For example: <xt cache scope="session">In this case, if we didn't include the scope="session", the next visitor to that screen would see the previous visitor's name and profile information -- a big privacy faux pas! Next: Query-level caching Page 1:
Caching in General |
|
Copyright © 2008, SIMIAN systems Inc. All rights reserved. Privacy policy Some of the icons on this site were created by the Gnome Project. |