AxlCache -- TTL Cache ===================== TTL cache with LRU eviction. Fixed-size slots, string keys, opaque fixed-size values. Designed for single-threaded UEFI use. Header: ```` Overview -------- AxlCache is a simple key-value store with time-based expiration and least-recently-used eviction when full. Values are **copied** into fixed-size slots (not stored as pointers). Use cases: DNS resolution caching, HTTP response caching, SMBIOS lookup caching. .. code-block:: c // Cache up to 16 entries, each 4 bytes (e.g., IPv4 addresses) AXL_AUTOPTR(AxlCache) cache = axl_cache_new(16, sizeof(uint32_t), 60000); // ^ ^ ^ // slots value size TTL (ms) // Store a value uint32_t addr = 0xC0A80101; // 192.168.1.1 axl_cache_put(cache, "gateway", &addr); // Retrieve uint32_t result; if (axl_cache_get(cache, "gateway", &result) == 0) { // hit -- result contains the cached value } // Invalidate a specific entry axl_cache_invalidate(cache, "gateway"); // Invalidate all entries axl_cache_invalidate_all(cache); API Reference ------------- .. doxygenfile:: axl-cache.h