Altering a Cache Group to Change the AUTOREFRESH Mode, Interval or State

After creating a cache group with autorefresh, you can use ALTER CACHE GROUP statement to change autorefresh mode, interval or state.

  • In TimesTen Classic, you can change the cache group's autorefresh mode, interval or state.

  • In TimesTen Scaleout, you can only change the cache group's autorefresh state.

You cannot use ALTER CACHE GROUP to instantiate automatic refresh for a cache group that was originally created without autorefresh defined.

If you change a cache group's autorefresh state to OFF or drop a cache group that has an autorefresh operation in progress:

  • The autorefresh operation stops if the setting of the LockWait connection attribute is greater than 0. The ALTER CACHE GROUP or DROP CACHE GROUP statement preempts the autorefresh operation.

  • The autorefresh operation continues if the LockWait connection attribute is set to 0. The ALTER CACHE GROUP or DROP CACHE GROUP statement is blocked until the autorefresh operation completes or the statement fails with a lock timeout error.

The following example alters the autorefresh attributes of a cache group in TimesTen Classic. These statements change the autorefresh mode, interval and state of the customer_orders cache group:

ALTER CACHE GROUP customer_orders SET AUTOREFRESH MODE FULL;
ALTER CACHE GROUP customer_orders SET AUTOREFRESH INTERVAL 30 SECONDS;
ALTER CACHE GROUP customer_orders SET AUTOREFRESH STATE ON;

TimesTen returns asynchronously after executing the ALTER CACHE GROUP statement. However, there may be a delay for the cache agent to implement the change for the new state, mode or interval.