libaaruformat 1.0 Aaru Data Preservation Suite - Format Library

Loading...
Searching...
No Matches
CacheHeader Struct Reference

Cache top-level descriptor encapsulating the hash table root and capacity limit. More...

`#include <aaruformat/lru.h>`

## Data Fields
uint64_t | max_items
| Hard limit for number of entries (policy: enforce/ignore depends on implementation).
struct CacheEntry * | cache
| Hash root (uthash). NULL when empty.

## Detailed Description

Cache top-level descriptor encapsulating the hash table root and capacity limit.

The cache enforces an upper bound (max_items) on the number of tracked entries. Insert helpers are expected to evict (or refuse) when the limit is exceeded (strategy defined in implementation; current behavior may be simple non-evicting if not yet implemented as a true LRU). The cache pointer holds the uthash root (NULL when empty).

Fields:

- max_items: Maximum number of entries allowed; 0 means "no explicit limit" if accepted by implementation.
- cache: uthash root pointer; NULL when the cache is empty.

Definition at line 45 of file lru.h.

## Field Documentation

## ◆ cache

struct CacheEntry* CacheHeader::cache

Hash root (uthash). NULL when empty.

Definition at line 48 of file lru.h.

Referenced by aaruf_create(), aaruf_open(), add_to_cache(), and find_in_cache().

## ◆ max_items

uint64_t CacheHeader::max_items

Hard limit for number of entries (policy: enforce/ignore depends on implementation).

Definition at line 47 of file lru.h.

Referenced by aaruf_create(), aaruf_open(), and add_to_cache().

The documentation for this struct was generated from the following file:

- include/aaruformat/lru.h