Start a Cache Agent (dbCacheStart)

The cache agent performs cache operations, such as loading a cache group and managing incremental autorefresh. TimesTen distributes cache tasks across different cache agents (each running on different data instances), where all work for a specific autorefresh interval is assigned to a single cache agent. A cache agent can manage multiple autorefresh intervals.

The dbCacheStart command starts the cache agent.

ttGridAdmin dbCacheStart name [-instance hostname[.instancename]]
          [-nowait | -wait [timeout]]

Options

The dbCacheStart command has the options:

Option Description

name

The name of the database.

-instance hostname[.instancename]

If specified, cache agent(s) are created only on the specified instance(s), instead of on all instances of the grid.

If -instance is used, then the hostname is required. The instancename is required only if there is more than one instance on the host. (See Grid Objects and Object Naming.)

-nowait | -wait [timeout]

The command initiates a state change that is recorded in the active management instance of the grid.

The -nowait option causes the command to return immediately without waiting for the state change. This is the default behavior.

The -wait option causes the command to wait for the state change to complete, when the database element has been closed on each instance in the grid. You can optionally subject the wait to a limit of timeout seconds. Otherwise, or if timeout is set to 0, there is no limit.

In a large grid, it is not typical or generally advisable to use -wait. If you do, it is advisable to set a timeout. (See Database Management Operations.)

Examples

From the management instance, use the ttGridAdmin dbCacheStart command to start cache agents on all data instances in the database1 database:

% ttGridAdmin dbCacheStart database1
Database database1 : Starting cache agents. 

% ttGridAdmin dbStatus database1 -element
Database database1 element level status as of Thu Dec 24 09:59:14 PST 2020
 
Host  Instance  Elem Status CA Status Date/Time of Event  Message 
----- --------- ---- ------ --------- ------------------- ------- 
host3 instance1    1 opened started 2020-12-24 09:59:14         
host4 instance1    2 opened started 2020-12-24 09:59:14         
host5 instance1    3 opened started 2020-12-24 09:59:14         
host6 instance1    4 opened started 2020-12-24 09:59:14         
host7 instance1    5 opened started 2020-12-24 09:59:14         
host8 instance1    6 opened started 2020-12-24 09:59:14 

You can start the cache agent for a specific data instance with the -instance option.

% ttGridAdmin dbCacheStart database1 -instance host4.instance1
Database database1 : Starting cache agents. 

% ttGridAdmin dbStatus database1 -element
Database database1 element level status as of Mon Dec  7 14:52:51 PST 2020
 
Host  Instance  Elem Status CA Status Date/Time of Event  Message 
----- --------- ---- ------ --------- ------------------- ------- 
host3 instance1    1 opened stopped 2020-11-23 08:37:35         
host4 instance1    2 opened started 2020-12-07 14:52:51         
host5 instance1    3 opened stopped 2020-11-23 08:37:35         
host6 instance1    4 opened stopped 2020-11-23 08:37:35         
host7 instance1    5 opened stopped 2020-11-23 08:37:35         
host8 instance1    6 opened stopped 2020-11-23 08:37:35