Skip to main content

Module cache

Module cache 

Source

Structs§

CacheStats
Cache stats for display.
SourceMeta
Metadata stored alongside each cached source.

Enums§

SourceStat

Functions§

clear_cache
Clear the cache (preserves config.yaml).
evict_lru_cache
Evict cached data from the oldest sources until total cache size is under the limit. Returns the number of bytes freed.
get_cache_stats
get_source_data_dir
get_source_dir
get_source_meta_path
get_source_registry_path
get_source_search_index_path
has_any_registry
Check if any source has a registry available.
is_source_cache_fresh
load_search_index
Load BM25 search index for a single source.
load_source_registry
Load cached/local registry for a single source.
read_cached_doc
Read a cached doc if it exists (handles both plain and gzip-compressed).
read_meta
save_cached_doc
Save a fetched doc to the source data cache. Content larger than 10 KB is gzip-compressed (saved as .gz).
save_source_registry
Save a fetched registry to the source cache.
should_fetch_remote_registry
Returns true if we should fetch the remote registry for this source. Inverse of fresh check, but also returns true when no registry exists at all.
touch_source_meta
Update the last_updated timestamp for a source.
write_meta