
The "cache" attribute for listing and template
The cache attribute allows you to cache the results of template and listing selector. This attribute is usually used when you can't apply "Page Acceleration" caching on the entire web page but yet you would like to cache certain part of the page to improve performance. For example if you have a page that's look like the following:
<!--[template code="header.tsl"]-->
My Main body
...
<!--[template code="rightbar.tsl"]-->
...
<!--[template code="footer.tsl"]-->
And from the above you realized the page can be improved by caching "header.tsl" where the codes needs only to be processed once and the end result can be cached and reused many times. Thus this reduce the length of time required to serve the page.
<!--[template code="header" cache="3600"]-->
The value accepted by cache attribute is any integer larger than zero indicating the number of seconds the template is to be cached before it is being refreshed with new content.The same can be applied to listing block TSL tag.
<!--[listing mode="article" quantity="10" cache="1800"]-->
...
<!--[/listing]-->
MXAE Release News
MXAE 2.7.5 Released ![]() |
![]() |
Tips & Tricks
Browser Type and Version Checking ![]() |
![]() |