|
libaaruformat 1.0
Aaru Data Preservation Suite - Format Library
|
Single hash entry in the in-memory cache. More...
#include <aaruformat/lru.h>
Data Fields | |
| char * | key |
| Null-terminated key string (unique within the cache). May encode numeric keys. | |
| void * | value |
| Opaque value pointer associated with key (not freed automatically on eviction/clear). | |
| UT_hash_handle | hh |
| uthash handle linking this entry into the hash table (must remain last or per uthash docs). | |
Single hash entry in the in-memory cache.
This structure is managed by uthash (open addressing with chaining semantics provided by macros). It represents one key/value association tracked by the cache. The cache implementation supports both string keys (null-terminated) and 64-bit numeric keys; numeric keys are stored by casting to a temporary string buffer upstream (see implementation). Callers do not allocate or free individual entries directly; use the cache API helpers.
Lifetime & ownership:
| UT_hash_handle CacheEntry::hh |
uthash handle linking this entry into the hash table (must remain last or per uthash docs).
Definition at line 30 of file lru.h.
Referenced by add_to_cache(), and find_in_cache().
| char* CacheEntry::key |
Null-terminated key string (unique within the cache). May encode numeric keys.
Definition at line 28 of file lru.h.
Referenced by add_to_cache(), add_to_cache_uint64(), find_in_cache(), and find_in_cache_uint64().
| void* CacheEntry::value |
Opaque value pointer associated with key (not freed automatically on eviction/clear).
Definition at line 29 of file lru.h.
Referenced by add_to_cache(), add_to_cache_uint64(), and find_in_cache().