skip to main content
Reference : Supported SQL Statements and Extensions : Create Cache (EXT) : Persist Clause
  

Try DataDirect Drivers Now
Persist Clause

Purpose

The Persist clause specifies the life span of the data in the cached table or view; it is optional.

Syntax

[PERSIST {TEMPORARY | MEMORY | DISK | DEFAULT}]
where:
TEMPORARY
specifies that the data exists for the life of the driver session. When the driver session ends, the data is discarded. A driver session begins on the first connection for a user and the session is active if at least one connection is open for the user.
MEMORY
specifies that the data exists beyond the life of the connection. While the connection is active, the cached data is stored in memory. When the connection is closed, the cached data is persisted to disk. If the connection ends abnormally, changes to the cached data may not be persisted to disk. This is the default.
DISK
specifies that the data exists beyond the life of the connection. A portion of the cached data is stored in memory while the connection is active. If the size of the cached data exceeds the cache memory threshold, the remaining data is stored on disk. When the connection is closed, the portion of the cached data that is in memory is persisted to disk. If the connection ends abnormally, changes to the cached data held in memory may not be persisted to disk.
DEFAULT
resets the PERSIST value back to its default, which is MEMORY.

Notes

*You can design your application to force all cached data held in memory to be persisted to disk at any time by using the "Checkpoint" statement.
*If you specify a value of MEMORY or DISK for the Persist clause, the remote data remains on the client past the lifetime of the application.