Skip to main content

Module disk_cache

Module disk_cache 

Source
Expand description

On-disk model cache for fast model reloading.

Caches quantized model weights + metadata in a binary format (.oxcache) for faster cold-start loading vs. re-parsing GGUF files.

Format: Header: "OXCA" (4 bytes) + version u32 + num_entries u64 + metadata_len u32 Metadata: JSON string (hand-serialised, no serde) Per entry: name_len u32 + name (UTF-8) + quant_type_len u32 + quant_type + data_len u64 + data bytes

Structs§

CacheEntry
An entry in the disk cache, representing one named tensor blob.
CacheFileInfo
Information about one cached model file on disk.
CacheManager
Manages multiple cached model files with LRU eviction.
DiskCache
In-memory representation of a .oxcache file.

Enums§

DiskCacheError
Errors produced by disk-cache operations.

Constants§

CACHE_MAGIC
Magic bytes identifying an Pictor disk cache file.
CACHE_VERSION
Current cache format version.