4D v16.3

FLUSH CACHE

Home

 
4D v16.3
FLUSH CACHE

FLUSH CACHE 


 

FLUSH CACHE {( size | * )} 
Parameter Type   Description
size | *  Real, Operator in * to completely free cache memory, or number of bytes to free in cache

The FLUSH CACHE command immediately saves the data buffers to disk. All changes that have been made to the database are stored on disk.

By default, the current cache memory is left untouched, which means that its data continues to be used for subsequent reading accesses. Optionally, you can pass a parameter to modify its contents:

  • pass * to save the cache and free up entire cache memory.
  • pass a size value to save the cache and free up only the size number of bytes from the cache.

Note: Passing a parameter to this command is reserved for testing purposes. For performance reasons, it is not recommended to free up the cache in the production environment.

In normal cases, you should not call this command, as 4D saves data modifications on a regular basis. The Flush Cache every X Seconds (Minutes) option on the Database/Memory page of the Database Settings, which specifies how often to save, is typically used to control cache flushing. We recommend using the default value of 20 seconds. Note also that the Cache flush periodicity parameter can be set and read using the SET DATABASE PARAMETER and Get database parameter commands.



See also 

Get database parameter
SET DATABASE PARAMETER

 
PROPERTIES 

Product: 4D
Theme: Cache Management
Number: 297

This command can be run in preemptive processes

 
HISTORY 

New
Created: < 4D v6
Modified: 4D v16
Renamed: 4D v16

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)