RetrostashOkHttpCache
Direct cache control for the OkHttp / Retrofit adapter — peek, update, invalidate*, clearAll. Methods are blocking; each call wraps a single coroutine via runBlocking so Android consumers don't have to manage a coroutine scope.
Entries are wrapped in a synthetic CachedHttpEnvelope on updateQuery (status 200, the supplied content-type, no headers) so they're indistinguishable from interceptor-written entries on read-back.
Full guidance — including how to source the bytes for updateQuery from Response<MyDto> / Response<String> and the converter-agnostic philosophy behind that — lives in the README: Cache API.
Obtained via RetrostashOkHttpBridge.cache.
Functions
Invalidates a single template/key directly, bypassing annotation extraction. Returns true if a non-blank key was scheduled for invalidation.
Removes every cached entry whose tag set contains tag. The tag must be the resolved value (e.g. "article:concept123"). Returns true if a non-blank tag was scheduled.
Bulk version of invalidateTag. Blank values are skipped.
Returns the cached payload for a query, or null if no entry, the placeholders couldn't be resolved, or the store call timed out. The returned bytes are envelope-unwrapped — the same body bytes the network would have returned.