The cache is essentially a multi-level hash table. The first level is based on the primary key. Entries for the same function call (though not exactly the same arguments or the same result) are grouped by primary key. A primary key is computed as a hash of certain things which define the function call. Exactly what is included varies. Currently primary keys are implemented as 128 numbers.

"Primary key" is often abbreviated to "pk".

The collection of all entries with the same primary key is called a PKFile. Because there can be a very large number of these (theoretically as many as 2^128), the cache groups PKFiles together on disk based on their most significant bits. (Currently this grouping is done using the first 16 bits.) Such a collection of PKFiles with the same prefix is called a MultiPKFile. PrintMPKFile prints the contents of a MultiPKFile.

See also: