ttCacheAutorefresh

This procedure starts an immediate autorefresh on the set of cache groups that are associated by sharing the same autorefresh interval with the specified cache group. This set of associated cache groups would usually be refreshed together automatically. The effect on the autorefresh process is the same as that of adding a new cache group with the same refresh interval as that of the specified cache group.

This procedure is useful if updates have occurred on the Oracle database and you would like to refresh them on the cache group before the next scheduled autorefresh.

If there is an existing transaction with locks on table objects that belong to the set of cache groups to be autorefreshed, this procedure returns an error without taking any action. This procedure establishes a condition that requires that you commit or rollback before you can perform other work in the session.

Required Privilege

This procedure requires the CACHE_MANAGER or ADMIN privilege.

Usage in TimesTen Scaleout and TimesTen Classic

This procedure is supported in TimesTen Classic but not supported in TimesTen Scaleout.

Related Views

This procedure has no related views.

Syntax

ttCacheAutorefresh ('cgOwner', 'cgName', synchronous)

Parameters

ttCacheAutorefresh has the parameters:

Parameter Type Description

cgOwner

VARCHAR2 (30)

Name of the cache group owner.

cgName

VARCHAR2 (30) NOT NULL

Name of the cache group.

synchronous

TT_INTEGER

Species whether data is updated on synchronously or asynchronously.

0 or NULL - Asynchronous mode. The procedure returns immediately.

1 - Synchronous mode. The procedure returns after the refresh operation has completed on all associated cache groups.

Result Set

ttCacheAutorefresh returns no results.

Examples

This example autorefreshes the testcache cache group and all cache groups with the same autorefresh interval. The procedure returns synchronously.

Command> call ttcacheautorefresh('user1','testcache', 1);

Notes

The specified cache group AUTOREFRESH state must be ON. While other associated cache groups can be in any state, they are not refreshed if they are not in the autorefresh ON state. An autorefresh of the specified associated cache groups cannot be in progress. You cannot call this procedure on the standby node of an active standby pair.

This procedure is available only for cache operations.