Learn About Read-Only Cache Groups

When you create your cache group, you decide whether your read-only cache group will manually or dynamically load desired cache instances or manually or automatically refresh changes from the Oracle database.

Both static and dynamic read-only cache groups have rules and recommendations for load and refresh operations.

Read-Only Cache Group Load Operations Refresh Operations

Static Read-Only cache group

You must perform an initial load with a manual LOAD CACHE GROUP SQL statement.

A manual load is only used when initially populating the static read-only cache group.

After the initial population with a manual load, all changes to data on the Oracle database are loaded by incremental autorefresh operations, which run at a specified timed interval. The default interval time is 5 minutes.

If there is a situation where you want to run a refresh operation in between autorefresh intervals, you can use a manual REFRESH SQL statement to synchronize data.

Dynamic Read-Only cache group

If data does not exist in the cache, then a dynamic load is attempted (for qualifying SQL statements). Once the cache instance is in the cache, any changes are automatically refreshed as normal.

A dynamic load request only loads new cache instances that have been inserted into the cache tables on Oracle database. Thus, a dynamic load operation does not load any data if the cache instance currently exists in the cache group.

Nornally, there is no manual load performed as the cache group is not initially populated with data.

When using autorefresh (the recommendation) any modifications made to the data on the Oracle database that also exists in the cache group on TimesTen is automatically refreshed (at timed intervals) to the cache group.

That is, cache instances that already exist in the cache tables are only changed or deleted with refresh operations.

If there is a situation where you want to run a refresh operation in between autorefresh intervals, you can use a manual REFRESH SQL statement to synchronize data.

When to use static or dynamic read-only cache groups:

  • Static Read-Only Cache Groups with Autorefresh: Use static read-only cache groups when you want to reduce the latency for read operations using SELECT statements when caching entire tables or static subsets of these tables.

    See Create a Static Read-Only Cache Group with Autorefresh
  • Dynamic Read-Only Cache Groups with Autorefresh: Use dynamic read-only cache groups when you are not sure whether you can identify the set of data to be cached in advance and/or whether the potential set of data to be cached can fit in the available memory.

    See Create a Dynamic Read-Only Cache Group with Autorefresh