|> Home > Documentation > Latest documentation > Interchange tags > timed-build|
Allows you to build CPU-intensive regions of Interchange tags on a timed basis.
Tag expansion example
or similarly with positional parameters:
Allows you to build CPU-intensive regions of Interchange tags on a timed basis. In the simplest case, you can just surround a region of Interchange tags with [timed-build] and [/timed-build], as follows:
If a file parameter is not passed then [timed-build] will save to the timed directory in the website's home directory (CatRoot), with the file name of the current page. If the minutes parameter, specifying how often the page should be rebuilt, is not passed then no rebuilding will occur until the output file is removed.
Name of the file in which to to save the results. Relative to the website home directory (CatRoot). If a directory is specified then it must exist.
The number of minutes after which the timed build should be repeated. If set to 0 then it will be built once and then not rebuilt until the output file is removed. If no number of minutes is specified then 60 will be assumed.
An alternative way of expressing time. You can pass a string describing the rebuild time period as follows:
period="4 hours" and minutes="240" are equivalent
The following region would be rebuilt every 5 seconds:
Turns on automatic region processing. The text of the timed-build region is processed to determine a unique checksum, or MD5 digest. The checksum/digest is then used as a file name in the "tmp/auto-timed" directory (assuming ScratchDir is set to "tmp"). This is designed to automatically build regions of commonly used areas without having to manage the file name yourself.
Allows you to to only display the cached region when this parameter is true. For example, you can do this:
If the [value timed] tag returns a non-zero, non-blank value then the cached region will be displayed. Otherwise, this tag's body text will be interpolated.
Normally [timed-build] will abort if the user is logged in, resulting in the region not being cached and the cached copy not being displayed. If this parameter is set true then the region will be cached even if the user is logged in.
You should use this parameter when the logged-in status of the user should not affect the displayed data.
This parameter is implied by the auto=1 parameter.
Normally [timed-build] will abort if the user is not using a session cookie, resulting in the region not being cached and the cached copy not being displayed. If this parameter is true then the region will be cached even if the user does not have a session cookie.
You should use this parameter only when there are no internal links to any Interchange pages in the cached region, otherwise usage can cause users without cookies to loose their session.
This parameter overrides the login parameter.