This function acts similar to the "inc" IdocScript function. It will evaluate the dynamic html include corresponding to 'includeName', and display it on the page. The difference is that if possible, it will pull the rendered html from a cache, instead of evaluating it again.

See "Keywords Versus Functions" for more information.

Type and Usage


Takes three required parameters and two optional parameters. For example:

cacheInclude(includeName, scope, lifeSpan [, cacheName, key]) 
Parameter Description
includeName The name of the dynamic html element to evaluate.
scope Set to 'session' if each user should see different html, or 'application' if all users will see the same thing.
lifeSpan The lifespan of this include in the cache, in seconds.
cacheName Optional: if you want to place this data into a named cache instead of the default cache. If an empty string is passed, it will cache the include into the default cache for the session.
key Optional: if you do not want automatic name-scoping of your cache to prevent conflicts, you can specify a unique key here.


This will cache the "std_page_begin" include for each user for ten minutes. This is about 10k per user in the cache.

<$cacheInclude("std_page_begin", "session", 600)$> 

See Also