Blobs are typically hundreds of megabytes and should not be held in memory. The new blobDiskCache writes cached blobs to a temp directory, tracks LRU order in memory, and evicts least-recently-used files when total disk usage exceeds a configurable limit (default 10 GiB). Design: - Blobs written to os.TempDir()/vaultik-blobcache-*/<hash> - Doubly-linked list for O(1) LRU promotion/eviction - ReadAt support for reading chunk slices without loading full blob - Temp directory cleaned up on Close() - Oversized entries (> maxBytes) silently skipped Also adds blob_fetch_stub.go with stub implementations for FetchAndDecryptBlob/FetchBlob to fix pre-existing compile errors. |
||
|---|---|---|
| .. | ||
| blob_fetch_stub.go | ||
| blobcache_test.go | ||
| blobcache.go | ||
| helpers.go | ||
| info.go | ||
| integration_test.go | ||
| prune.go | ||
| restore.go | ||
| snapshot.go | ||
| vaultik.go | ||
| verify.go | ||