ec_fc_create — Returns a new cache with maximum number of entries and a default expiration time
ec_fc_t * **ec_fc_create** ( | name, | |
| | n_entries, | |
| | expire, | |
| | destroy_entry
); | |
This reference page was automatically generated from functions found in the header files in the development branch. The function described here may not exist in generally available versions of Momentum, and may change in behavior when it is generally available. Consult your vendor for definitive advice on the use of this function.
Returns a new cache with maximum number of entries and a default expiration time.
Creates a faster cache whose entries have a maximum TTL of expire unless expire is EC_FC_EXPIRE_NEVER. destroy_entry is the destructor for the object. Note, the caller should add a reference to the entry before adding an item unless it isn’t important that the cache delete it during book-keeping. If name is NULL then a name is auto-generated based on the memory location of the new cache.
name of the cache, if NULL, name is auto-generated
number of entries in cache, rounded up to nearest power-of-two
default expiration time in seconds of items in the cache
destructor function for cache entries
Returns a new cache instance.
No default expiration time.