OptionalcacheDir: stringRemove all entries from the cache.
Remove stale entries older than maxAgeMs from the cache directory.
Intended to be called periodically (e.g., once per daily run).
Look up a cached response. Returns null if no cache entry exists.
Return the cached body if the entry exists and is younger than maxAgeMs.
Useful for time-based caching where ETag validation isn't applicable
(e.g., caching aggregated results from paginated API calls).
Get the in-flight promise for a URL (for deduplication).
Check whether a URL has an in-flight request.
Store a response with its ETag.
Register an in-flight request for deduplication. Returns a cleanup function to call when the request completes.
Return the number of entries currently in the cache.
File-based HTTP cache backed by
~/.oss-autopilot/cache/.Each cache entry is stored as a separate JSON file keyed by the SHA-256 hash of the request URL. This avoids filesystem issues with URL-based filenames and keeps lookup O(1).