User Tools

Site Tools


en:public:developer:template_system:tags:string:datacache

<#datacache>

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=1 in the http request params or in the cookie.

Parameters

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

Literal

<#datacache id=”..” validity=”…”>..content..<#enddatacache>

Example

<#datacache id="MySlowFunctionResult" validity="604800">
 
  <#ASlowFunction>
 
<#enddatacache>
 
en/public/developer/template_system/tags/string/datacache.txt · Last modified: 2015/04/16 16:36 by svanderclock