Expand description
Disk-backed caches for content-immutable lookups.
Two caches live here:
DiskItemsCache— parsed public-API items keyed by(blob_sha, Language). Blob SHAs are content hashes, so the cached parse result is correct forever for the same key.DiskPrCache— pull-request metadata keyed by(owner, repo, sha). Once a commit is associated with a merged PR, that fact is immutable; safe to cache forever.
Default location: $XDG_CACHE_HOME/entropyx/, falling back to
~/.cache/entropyx/. Override via $ENTROPYX_CACHE_DIR. Cache
files are JSON for inspectability; cache directory is created on
save if missing.
Structs§
- Disk
Items Cache - SHA-keyed cache of parsed public-API items, persisted as JSON.
- Disk
PrCache (owner, repo, sha)-keyed cache of pull-request lookups, persisted as JSON.Nonevalues are stored explicitly to record “queried, no PR found” — distinct from “never queried” (cache miss).
Functions§
- default_
cache_ dir - Resolve the default cache directory. Returns
Noneonly when none of$ENTROPYX_CACHE_DIR,$XDG_CACHE_HOME, or$HOMEis set.