feat: immutable/mutable caching patterns with conditional revalidation and stale fallback #14
Reference in New Issue
Block a user
Delete Branch "benvin/immutable-mutable-patterns"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
include/indexpattern terminology toimmutable/mutablethroughout config, cache, and testsmutable_ttlconfiguration and acheck_mutable_updatesflag for conditionalHEADrevalidation (304 → refresh TTL, no re-download)remotes.yamlas a documented example configurationhandle_expired_mutable()helperTest plan
pytest— all 162 tests passcheck_mutable_updates=true+ upstream returns 304 → TTL refreshed, no re-downloadcheck_mutable_updates=true+ upstream returns 200 → cache evicted, re-downloadedcheck_mutable_updates=true+ upstream unreachable → stale copy kept, TTL extended