This is an old revision of the document!
Use this tag to cache data in memory. This is particularly usefull when part of the of the template is slow to construct and not change between each request. if you want to ignore the cache, you can use ak.no_datacache in the http request params or in the cookie
Name | Mandatory | Description |
---|---|---|
Id | Yes | The key to use to store/retrieve the content |
content | Yes | content to cache in memory |
validity | Yes | Expiration time in seconds, 0 mean no delay, if validity is superior to 30 days, engine will use it as a UNIX timestamps for expiration |
<#datacache id=”..” validity=”…”>..content..<#enddatacache>
<#datacache id="MySlowFunctionResult" validity="604800"> <#ASlowFunction> <#enddatacache>