cache

cache — controls how frequently data is written.

Syntax

(cache mode label [label ...])
    

Arguments

mode

Any one of t, true, y, or yes (upper or lower case) sets caching on, which is the default.

Any one of f, false, n, or no (upper or lower case) turns off caching.

label

A log or group command label.

Returns

On success, t, otherwise one of the following error messages:

(error "textlog: Cache mode must begin with y, n, t, or f")
(error "textlog: Group or log label does not exist")
(error "textlog: Too few arguments to cache: # < #")
(error "textlog: Invalid command: cache")

or, if none of the above errors apply, nil.

Description

The cache command lets you determine how frequently data is written. When caching is on (y, the default), data is written in blocks, according to your default C library file buffer implementation. When caching is off (n), each line of output is immediately flushed from the buffer to the file.

[Note]

If the Cascade TextLogger is started with the -F option, this command is ignored because there is no possibility of caching; all data is immediately flushed to the file.

This command corresponds to the Cogent C API function LG_Cache.

See Also

log, textlog

Example

(cache y temp press)
(cache n max_ht min_ht)