An introduction to dcache.

DESCRIPTION

A dcache is a disk based caching database in a single file containing a header and fixed sized hash and data space.

The header holds variables and constants describing the database.

The hash table holds pointers into the data area and hashes of the keys. The hash function used is a crc32.

The data area consists of the data, the key, a 64bit number with application defined use, and two 32bit numbers holding key and data lengths.

The header and hash table are mapped into process address space using the mmap(2) system call. The data area is not memory mapped, thus allowing to handle multi-gigabyte files even on systems with a 32bit address space.

Limitations and features

TOOLS

dcachemake(1) is used to create a new cache with or without elements, and to add a large number of new elements to an existing cache. dcachedump(1) can dump a complete cache file.

dcacheadd(1) may be used to add a single record to the cache.
dcachedel(1) is the tool used to delete a record from the cache.
dcacheget(1) retrieves records from the cache.

dcachelist(1) lists the content of a cache, and dcachestats(1) prints cache statistics. dcachereplay(1) tries to finish incomplete transactions on a cache file.

SEE ALSO

dcache(5), libdcache(3), dcacheadd(1), dcachedel(1), dcachedump(1), dcacheget(1), dcachelist(1), dcachemake(1), dcachestats(1). dcachereplay(1).