Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

EXCLUSIVE File Caching

c-tree’s Multi-user Non-Server (Peer-to-Peer) model (FPUTFGET) specifically does not cache data. Because it is designed to allow multiple users to manage the data simultaneously, all reads and writes to the database are forced (e.g., all reads are done directly from the disk and write operations flush (sync) all data to disk. The internal acronym FPUTFGET stands for “force put/force get”, or in other words, “force write” and “force-read”.

However, when a file is opened in EXCLUSIVE mode, there is no sharing of the file, and therefore no need to force reads and writes. Cache can be used to gain better performance.

When a file is opened in EXCLUSIVE mode in c-tree’s Multi-user Non-Server (Peer-to-Peer) model (FPUTFGET), it can be cached. In order to take advantage of this feature, use either the InitCTreeXtd() or the InitISAMXtd() extended initialization call.

Note: If a non-extended initialization call is used (INTREE or INTISAM) under FPUTFGET, there will be NO data cache allocated..

As always, a data file that is NOT opened EXCLUSIVE will not be cached and therefore not use any of the data cache pages.

Note: If a cached file is not properly closed, its header will be marked with a “dirty” flag, and any subsequent open to this file will fail with a FCRP_ERR (14) error, indicating that the file’s data may not be intact.

TOCIndex