Cache Macro
Parameters
Customization
Usage
{cache}
Something to cache for a day
{cache}
{cache:refresh=30m}
This will be cached for 30 minutes
{cache}
{cache:refresh=2 hours}
The excel data will be cached for 2 hours
{excel:file=^Report.xls}
{cache}
{cache:cron=30 * * * *|showRefresh=true|title=Refresh data from database}
This will be cached until 30 minutes past each hour of the day
{sql:dataSource=ReportDS}
select * from report
{sql}
{cache}
{cache:refresh=1d|showRefresh=true|showDate=true}
{beanshell}
System.out.println("Hello world " + (new Date()) );
{beanshell}
{cache}
Advanced Examples
Tips and Techniques
Compatibility With Other Macros
See Interoperability
Cache Refresh
To force all cache macros on a page to refresh, use the refresh request attribute with value true
Example
http://localhost/display/DEMO/test?refresh=true
To force a specific cache macros on a page to refresh, use refresh request attribute with value equal to the cache macro id. If not specified, it defaults to a sequence number based on position on page
Example
http://localhost/display/DEMO/test?refresh=1 http://localhost/display/DEMO/test?refresh=myId
, multiple selections available,
Need support? Create a request with our support team.