dcache is a database library implementing a persistent first-in-first-out cache.
The database (or `cache') size limits are configured at creation time, and as soon as they are reached the oldest records are automatically removed.
dcache library has a number of commandline tools for managing the database.
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.
Here are some key features of "dcache":
· The database size is limited to 63 bits on operating systems supporting large files.
· The database size is limited to 31 bits (2 gigabytes) on operating systems not supporting large files.
· The sum of the length of key, data and record overhead is limited to 31 bits (2 gigabytes).
· The record overhead in the data area is 16 bytes.
· The number of possible keys is limited by the address space of the process, or somewhat over 200 million, whatever comes first.
· Storage of numbers is done in big endian byte order ('network byte order'). Databases are portable between hosts with different byte orders.
· The size of the cache and the number of records in it are set at creation time.
· The cache is cleaned up automatically, removing old records if there's not enough space for data or records.
· Deletions are supported.
· Multiple readers and writers are supported, provided that the applications lock to database.
· Keys need not be unique.
The dcache library files are published under the GNU Lesser General Public License (don't hesitate to ask me if this is a problem for you). The tools are published under the GNU GENERAL PUBLIC LICENSE.
What's New in This Release:
· This release fixes a few compiler and linker warnings, among them those breaking the self check when using dietlibc.
· No functional changes were done.