services/api_cache library

Classes

ApiCache
A local copy of the answers an app reads from its API, so a screen can draw what it showed last time while it asks the server again ("local then server").
ApiCacheCodec<T>
Turns an answer into text that can be saved, and back.
ApiCacheStore
Where an ApiCache keeps its answers, and whose they are.
Cached<T>
One answer from a CachedCall.
CachedCall<T>
One API read, described but not yet made. The caller decides how it is served each time it is fetched:
MemoryApiCacheStore
Keeps answers for the life of the process. The default store, and the one for tests.
StoredAnswer
One saved answer: its text and when it was saved.

Enums

CacheSource
Where a Cached answer came from.
CacheStrategy
How a CachedCall is served.