Cache / SetCacheViewHelper

This is a ViewHelper to set a new cache entry.

General properties

Name Required Type
string
true PoiCollection
true string
array
int

prefix

prefix
Type
string

If you want you can define a prefix for the generated CacheIdentifier. Leave this value empty to use "infoWindow" as default value

poiCollection

poiCollection
Type
PoiCollection
Required

true

You must assign the PoiCollection object to this ViewHelper. We extract some data from PoiCollection to build a more unique CacheIdentifier which can differ Caches in multilingual environment.

data

data
Type
string
Required

true

The data as string which has to be stored.

tags

tags
Type
array

You can define some additional CacheEntryTags if you want. By default we add two additional Cache Tags named infoWindowUid{PoiCollectionUid} and infoWindowPid{PoiCollectionPid}

lifetime

lifetime
Type
int

How long (in seconds) the CacheEntry should be available, before it will be re-generated? Keep this value empty to use the Default Value of Storage-Backend. 0 for unlimited.

Examples

Basic example

{maps2:cache.setCache(poiCollection: poiCollection, data: '{content->f:format.raw()}')}
Copied!