Sets or displays pool cache setting.
rp_pool_cache [pool_name, cache]
Name of the pool to be displayed or changed.
The number of seconds that connection caches are held in the pool. Setting this to a value of zero (0) disables future connection caching.
Displays the list of all pools and their current cache values.
1> rp_pool_cache 2> go
Returns:
pool_name cache --------------------- --------- POOL_A 0 POOL_B 30 POOL_C 0
Displays the current cache value for POOL_A.
1> rp_pool_cache "POOL_A" 2> go
Returns:
pool_name cache --------------------- --------- POOL_A 0
Changes the cache of POOL_A to 10 seconds.
1> rp_pool_cache "POOL_A", 102 > go
Returns:
pool_name cache --------------------- --------- POOL_A 10
Changes the cache of all pools to 30 seconds.
1> rp_pool_cache NULL, 30 2> go
Returns:
pool_name cache --------------------- --------- POOL_A 30 POOL_B 30 POOL_C 30
The cache value for a pool indicates the number of seconds that an outgoing connection is to be maintained following a disconnection from a client application. Connection caching can greatly improve performance of applications that rapidly create short-duration connections.
If you use connection caching, verify that the client application resets all necessary connection options after every new connection. OpenSwitch does not reset connection options when it reuses a cached connection to the Adaptive Server. Option settings from a previous connection continue to take effect for new client connections that use the same user name and password until you reset the options.
Changing the cache duration for a pool does not affect those connections that are already cached; it only affects future connections.
For more details, see “Using connection caching”.
The pool does not exist within OpenSwitch:
rp_pool_cache: There is no such pool 'pool_name'.
The list of existing pools can be determined using rp_pool_help. New pools can be defined using rp_pool_create.
rp_pool_create, rp_pool_help