<feed xmlns='http://www.w3.org/2005/Atom'>
<title>hutch.git/Docs/API_CACHE.md, branch v3.8.0</title>
<subtitle>ios client for sourcehut. swiftui.
</subtitle>
<id>http://git.krz.sh/krz/hutch.git/atom?h=v3.8.0</id>
<link rel='self' href='http://git.krz.sh/krz/hutch.git/atom?h=v3.8.0'/>
<link rel='alternate' type='text/html' href='http://git.krz.sh/krz/hutch.git/'/>
<updated>2026-05-07T01:41:49+00:00</updated>
<entry>
<title>feat(cache): persist read-only API responses</title>
<updated>2026-05-07T01:41:49+00:00</updated>
<author>
<name>Christian Cleberg</name>
<email>hello@cleberg.net</email>
</author>
<published>2026-05-07T01:41:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.krz.sh/krz/hutch.git/commit/?id=205cf2687ce48f3d004792ff223422a86cc6bdbc'/>
<id>urn:sha1:205cf2687ce48f3d004792ff223422a86cc6bdbc</id>
<content type='text'>
Add a bounded stale-while-revalidate cache at the Sourcehut API boundary with
stable keys, centralized TTLs, request coalescing, payload hashing, and LRU disk
pruning.

Cache high-value read-only repo, build, ticket, project, profile, paste, and
Home/Work Queue data while keeping mutations network-only and invalidating
related prefixes after successful writes.

Add focused cache tests and implementation notes.
</content>
</entry>
<entry>
<title>feat: add persistent stale-while-revalidate API cache</title>
<updated>2026-05-07T01:30:34+00:00</updated>
<author>
<name>Christian Cleberg</name>
<email>hello@cleberg.net</email>
</author>
<published>2026-05-07T01:30:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.krz.sh/krz/hutch.git/commit/?id=57e4f34b4613c09beb0cb757ac2ba2b43cc04daf'/>
<id>urn:sha1:57e4f34b4613c09beb0cb757ac2ba2b43cc04daf</id>
<content type='text'>
Introduce an actor-backed persistent cache layer at the SRHTClient boundary
for read-only SourceHut data. Cache entries now store stable metadata
including key, resource type, fetched/expires/access timestamps, payload
hash, schema version, and payload size, with bounded memory and disk usage.

Add centralized cache key builders and TTL defaults for repository, file,
ticket, build, log, profile, status, and list-style resources. Support
networkOnly, cacheOnly, cacheFirstThenRefresh, and refreshIgnoringCache
policies, plus request coalescing for duplicate in-flight cache keys.

Integrate first-pass caching into high-value low-risk read paths:
- build detail and completed/active build logs
- ticket detail
- README lookup
- repository tree, blob, and linked file reads

Keep mutation paths network-only and add simple prefix invalidation after
ticket and build mutations. Add compact cached/stale UI status rows and a
Settings action to clear the persistent cache.

Add focused cache tests covering round trips, expiration, stale fallback,
policy behavior, request coalescing, prefix invalidation, size limits, LRU
pruning, expired pruning, and mutation bypass behavior. Document storage,
key, TTL, invalidation, limitations, and next recommended targets.
</content>
</entry>
</feed>
