User Tools

Site Tools


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

This is an old revision of the document!


<#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

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.1367495084.txt.gz · Last modified: 2013/05/02 15:44 by svanderclock