Expand description
Document cache module
Provides document-specific cache service with support for independent TTL configuration for crate docs, search results, and item docs.
§Cache key format
- Crate documentation:
crate:{name}orcrate:{name}:{version} - Search results:
search:{query}:{limit} - Item documentation:
item:{crate}:{path}oritem:{crate}:{version}:{path}
§Examples
use std::sync::Arc;
use crates_docs::tools::docs::cache::{DocCache, DocCacheTtl};
use crates_docs::cache::memory::MemoryCache;
let cache = Arc::new(MemoryCache::new(1000));
let doc_cache = DocCache::new(cache);Structs§
- Cache
KeyGenerator - Cache key generator for document cache
- Cache
Stats - Cache statistics tracker
- DocCache
- Document cache service
- DocCache
Ttl - Document cache TTL configuration