package plebeia
Module Plebeia.Node_cacheSource
Node hashconsing based on the hashes
It actually provides an on-memory cache map from Hash.t to Index.t
The cache table type
Source
type config = {threshold_at_shrink : int;(*Call of
*)shrinktriggers the wipe of unpopular data when the number of the items in the table exceeds this amountthreshold_absolute : int;(*Call of
*)addtriggers the wipe of unpopular data when the number of the items in the table exceeds this amountshrink_ratio : float;(*How much data we keep for each wipe.
*)
}Create a new empty table with the shrink_size. May raise Invalid_arg
Print out the stat
Estimated table size in bytes.
This is for 28 byte Hash.t and 32 byte Index.t, where each element costs about 142 bytes.
It returns 99-101% of the real size.