Main page
Caching
Description
This example shows how to implement caching.
Usage
Open CacheExample in the browser then click on the browser's 'Reload' button.
Steps to recreate
Project Settings:
- Open the 'Project Settings' window by clicking on the 'Settings' button on the Toolbar.
- Under the Caching tab check the Enable checkbox,
set Method property to Database,
set Connection property to IntranetDb,
set Table property to cache,
set Cache Key field property to cache_key,
set Expiration Data field property to cache_expired,
and set Cache Content field property to cache_data.
Pages:
- Create a new page clock1 and set its Includable and Enable Caching properties to Yes.
- For the page, open the 'Caching' window by clicking on the [...] button next to the
Enable Caching property and set the Duration property to 10 seconds.
- Create a new page clock1 and set its Includable and Enable Caching properties to Yes.
- For the page, open the 'Caching' window by clicking on the [...] button next to the
Enable Caching property and set the Duration property to 10 seconds.
- Add a Label to the page, set its Data type property to Date,
Format property to GeneralDate and Default value property to CurrentDateTime.
- Create a new page clock2 and set its Includable property to Yes
and Enable Caching property to No.
- Add a Label to the page, set its Data type property to Date,
Format property to GeneralDate and Default value property to CurrentDateTime.
- Create a new page CacheExample and insert clock1 and clock2
Include Page pages from Forms tab of the Toolbox panel
Database Tables Used
Database: IntranetDB
Tables: cache