Daylight v4.9
Release Date: 1 February 2008

Name

dt_thor_cachecontrol - specify the caching strategy for a database

Generic Prototype

dt_thor_cachecontrol(dt_Handle, dt_Integer, dt_Integer) => dt_Boolean

C Prototype

#include "dt_thor.h"

dt_Boolean dt_thor_cachecontrol(dt_Handle database, dt_Integer when, dt_Integer level)

FORTRAN Prototype

include 'dt_f_thor.inc'

logical dt_f_thor_cachecontrol(database, when, level)

integer*4 database
integer*4 when
integer*4 level

Description

Overrides cache requests for normal users. The cache control specification becomes a property of the database and remains in effect when the database is closed and reopened.

The parameter 'level' controls the caching to perform as follows:

DX_THOR_CACHE_OFF           no caching
DX_THOR_CACHE_WRITETHRU     write-thru cache of hash table
DX_THOR_CACHE_READWRITE     complete cache of hash table
DX_THOR_CACHE_WRITETHRU_ALL write-thru cache of everything
DX_THOR_CACHE_READWRITE_ALL complete cache of everything
The parameter 'when' controls the caching operation itself:
DX_THOR_CACHE_NEVER   disables all caching.  Caching
                      requests are silently ignored.
DX_THOR_CACHE_OK      enables caching, when requested.
DX_THOR_CACHE_ALWAYS  forces caching on whenever a 
                      database is opened, to 'level'.
                      Caching requests are silently
                      ignored.
The default value for 'when' for a database is DX_CACHE_THOR_OK.

Return Value

Returns the success (TRUE) or failure (FALSE) of the operation.

Related Topics

dt_thor_cache(3) dt_thor_cachesync(3) dt_hold(3) dt_thor_autocrunch_limit(3) dt_thor_getauxillarydb(3) dt_thor_setauxillarydb(3) dt_thor_readonly(3) dt_thor_setreadonly(3)