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:

  1. Open the 'Project Settings' window by clicking on the 'Settings' button on the Toolbar.
  2. 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:

  1. Create a new page clock1 and set its Includable and Enable Caching properties to Yes.
  2. 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.
  3. Create a new page clock1 and set its Includable and Enable Caching properties to Yes.
  4. 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.
  5. Add a Label to the page, set its Data type property to Date, Format property to GeneralDate and Default value property to CurrentDateTime.
  6. Create a new page clock2 and set its Includable property to Yes and Enable Caching property to No.
  7. Add a Label to the page, set its Data type property to Date, Format property to GeneralDate and Default value property to CurrentDateTime.
  8. 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