How zkat/cacache-rs works
cacache is a concurrent, content-addressable disk-cache library. Applications write keyed data, which is integrity-hashed and stored as content, with key metadata recorded in an index; reads resolve the key and verify the stored content. The library also supports hash-based access, streaming large files, deletion, listing, and optional symlink-based ingestion. The graph reflects documented APIs and relationships visible in the supplied excerpts or SOURCE INDEX; some implementation details of unsampled modules are not shown.
Main entry points: index.rs Key Index · path.rs Content Addressing · put.rs Write API · get.rs Read API
Components 15
Cache APIs
- Write API
src/put.rs - Read API
src/get.rs - Link API
src/linkto.rs - Remove API
src/rm.rs - List API
src/ls.rs
Content Handling
- Content Writer
src/content/write.rs - Content Reader
src/content/read.rs - File Linker
src/content/linkto.rs - Content Removal
src/content/rm.rs - Content Addressing
src/content/path.rs
Disk Storage
- Key Index
src/index.rs - Content Store
src/content/write.rs
Runtime Support
- Async Runtime
src/async_lib.rs - Error Reporting
src/errors.rs
Other components
- Application
Connections 24
- Application → Write API: writes key
README.md - Application → Read API: reads key
README.md - Application → Remove API: removes entries
README.md - Application → Link API: links file
README.md - Write API → Content Writer: writes content
src/put.rs - Write API → Key Index: records metadata
src/put.rs - Content Writer → Content Addressing: resolves path
src/content/write.rs - Read API → Key Index: finds key
src/get.rs - Read API → Content Reader: reads verified content
src/get.rs - Content Reader → Content Addressing: resolves path
src/content/read.rs - Link API → File Linker: links target
src/linkto.rs - Link API → Key Index: records metadata
src/linkto.rs - File Linker → Content Addressing: resolves path
src/content/linkto.rs - Remove API → Content Removal: removes content
src/rm.rs - Remove API → Key Index: updates index
src/rm.rs - Content Removal → Content Addressing: resolves path
src/content/rm.rs - List API → Key Index: lists keys
src/ls.rs - Key Index → Content Addressing: resolves content
src/index.rs - Content Writer → Async Runtime: uses filesystem
src/content/write.rs - Content Reader → Async Runtime: uses filesystem
src/content/read.rs - File Linker → Async Runtime: uses filesystem
src/content/linkto.rs - Content Removal → Async Runtime: removes asynchronously
src/content/rm.rs - Write API → Error Reporting: returns errors
src/put.rs - Read API → Error Reporting: returns errors
src/get.rs