libaaruformat 1.0
Aaru Data Preservation Suite - Format Library
Loading...
Searching...
No Matches
CacheEntry Struct Reference

Single hash entry in the in-memory cache. More...

#include <aaruformat/lru.h>

Data Fields

uint64_t key
 64-bit integer key (unique within the cache).
void * value
 Opaque value pointer associated with key.
UT_hash_handle hh
 uthash handle (must remain per uthash docs).

Detailed Description

Single hash entry in the in-memory cache.

This structure is managed by uthash and represents one key/value association tracked by the cache. Keys are native 64-bit integers, hashed directly by uthash without string conversion. Callers do not allocate or free individual entries directly; use the cache API helpers.

Lifetime & ownership:

  • value is an opaque pointer supplied by caller; the cache does not take ownership unless a free_func is registered on the CacheHeader.

Definition at line 23 of file lru.h.

Field Documentation

◆ hh

UT_hash_handle CacheEntry::hh

uthash handle (must remain per uthash docs).

Definition at line 27 of file lru.h.

Referenced by add_to_cache_uint64(), find_in_cache_uint64(), and free_cache().

◆ key

uint64_t CacheEntry::key

64-bit integer key (unique within the cache).

Definition at line 25 of file lru.h.

Referenced by add_to_cache_uint64(), and find_in_cache_uint64().

◆ value

void* CacheEntry::value

Opaque value pointer associated with key.

Definition at line 26 of file lru.h.

Referenced by add_to_cache_uint64(), find_in_cache_uint64(), and free_cache().


The documentation for this struct was generated from the following file:
  • include/aaruformat/lru.h