Cache macro. Used to cache blocks of SXML.
The cache key is auto-generated based on the SXML in the Xml (default) parameter.
The cache key is auto-generated based on the SXML in the Xml (default) parameter.
Syntax
Smartsite SXML | Copy Code |
---|---|
<se:cache> <se:parameters> <se:parameter name="maxage"> </se:parameter> <se:parameter name="xml"> </se:parameter> </se:parameters> </se:cache> |
Parameters
Name | Data Type | Properties | Description |
---|---|---|---|
BypassExistingCache | Boolean |
NoCache
|
Sets a value indicating whether to bypass existing cache (default: false). |
GenerateKeyOnly | Boolean |
NoCache
|
Sets a value indicating whether to generate a cache key only (SXML code will not be executed). Default: false. |
Global | Boolean | - |
Sets a value indicating the cache is to be used globally (over all channels). Default: true. If not set (default setting), the generated cache key will include a reference to the curent channel, making the cache valid for this channel only. If you are sure the generated cache has no dependencies on channel-specific data, you can safely set 'Global' to true. |
KeyDependencies | Collection | - |
Sets a list of dependencies that will help generate a unique cache key for the cache block. For instance, if you wish to have cache generated depending on a querystring parameter or the current user-role, add vipers accordingly. |
MaxAge | String | - |
Sets the timeout in the format of a TimeSpan (HH:mm:ss). Default: none (cache until cache is flushed by external event, such as site refresh, AIM events) Use 0 for immediate timeout. |
UserAgentDependent | Boolean | - | Sets a value indicating whether the cache should be user-agent dependent (default: false). |
Xml | String |
RawData
IsRequired |
Sets the XML. |
Shared Parameters
Local Viper Methods
Viper | Extension | Description |
---|---|---|
This.ClearForcedResult |
Sets the result of the macro. used to override the normal handling of the result creation. |
|
This.GetCacheKey | Gets the key. | |
This.GetForcedResult | Gets the forced result of the macro, set by overriding the normal rendering using SetForcedResult(). | |
This.IsCached | Determines whether this instance is cached. | |
This.RenderTime | ✓ | Returns the render time of the macro in milliseconds. |
This.SetForcedResult |
Sets the result of the macro. used to override the normal handling of the result creation. |