Skip to main content

Module cache

Module cache 

Source
Expand description

Atomic, file-based HTTP cache.

Lightweight by design: no database engine, no C dependency. Each feed is stored as a pair of files under the cache dir, keyed by sha256(feed_url):

  • <hash>.json โ€” CacheMeta (validators + timestamps + content type).
  • <hash>.body โ€” the raw response body bytes.

Both are written atomically (temp file + rename) so a crash can never leave a torn entry. The cache exists for (a) conditional GET and (b) resolving show / get_item lookups โ€” it is not responsible for item-ID stability (IDs are deterministic; see crate::identity).

Structsยง

Cache
Handle to the on-disk cache directory.
CacheEntry
A full cache entry: metadata plus the raw body bytes.
CacheListItem
Summary of a cache entry for rss cache list.
CacheMeta
Cached HTTP metadata for a feed.