CacheFile Macro Example

In this example, a part of a complex application page is shown, where existing cache should conditionally be ignored.

Smartsite SXML CopyCode image Copy Code
<se:cachefile transfer="false" />

<!--// assume the pagetranslation skipcaching() 
       returns true when we need to create new cache -->

<se:if expression="translation.helpers.skipcaching()">
    {page.cache.ignore()}
</se:if>

{page.cache.serve()}