Package-level declarations

Types

Link copied to clipboard
class AndroidRetrostashStore(context: ERROR CLASS: Symbol not found for Context, config: RetrostashOkHttpConfig = RetrostashOkHttpConfig()) : RetrostashStore

Android-specific RetrostashStore backed by:

Link copied to clipboard
data class CachedHttpEnvelope(val payload: ByteArray, val contentType: String?, val statusCode: Int, val statusMessage: String, val headers: List<Pair<String, String>>)
Link copied to clipboard
data class OkHttpRetrostashMetadata(val scopeName: String, val queryTemplate: String? = null, val maxAgeMs: Long = 0, val bindings: Map<String, String> = emptyMap(), val invalidateTemplates: List<String> = emptyList(), val tagTemplates: List<String> = emptyList(), val invalidateTagTemplates: List<String> = emptyList())

Per-request OkHttp metadata read by RetrostashOkHttpInterceptor. Attach via the retrostash, retrostashQuery, or retrostashMutate extension on okhttp3.Request.Builder.

Link copied to clipboard

Android convenience factories for RetrostashOkHttpBridge.

Link copied to clipboard
class RetrostashOkHttpBridge(val store: RetrostashStore, config: RetrostashOkHttpConfig = RetrostashOkHttpConfig(), keyResolver: CoreKeyResolver = CoreKeyResolver(), val engine: RetrostashEngine = RetrostashEngine( store = store, keyResolver = keyResolver, timeoutMs = config.timeoutMs, ))

Top-level OkHttp/Retrofit integration object. Holds the RetrostashEngine + store and installs the two interceptors needed to read/write the cache:

Link copied to clipboard

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.

Link copied to clipboard
data class RetrostashOkHttpConfig(val timeoutMs: Long = 250, val maxEntries: Int = 64, val maxBytes: Long = 2 * 1024 * 1024L, val defaultMaxAgeMs: Long = 10 * 60 * 1000L, val logger: (String) -> Unit? = null, val cacheDirName: String = "retrostash_okhttp_cache", val prefsName: String = "retrostash_okhttp_store")

Tunables for RetrostashOkHttpInterceptor and AndroidRetrostashStore.

Link copied to clipboard
class RetrostashOkHttpInterceptor(engine: RetrostashEngine, config: RetrostashOkHttpConfig = RetrostashOkHttpConfig()) : <ERROR CLASS> ERROR CLASS: Symbol not found for Interceptor

OkHttp Interceptor that powers @CacheQuery / @CacheMutate semantics.

Functions

Link copied to clipboard
fun ERROR CLASS: Symbol not found for Request.Builder.retrostash(metadata: OkHttpRetrostashMetadata): ERROR CLASS: Symbol not found for Request.Builder

Attaches or merges metadata onto this Request.Builder as an OkHttp tag. Existing tag fields are preserved when incoming values are blank/null/empty.

Link copied to clipboard
fun ERROR CLASS: Symbol not found for Request.Builder.retrostashMutate(scopeName: String, invalidateTemplates: List<String> = emptyList(), bindings: Map<String, String> = emptyMap(), invalidateTags: List<String> = emptyList()): ERROR CLASS: Symbol not found for Request.Builder

Marks this request as a Retrostash mutation. Equivalent to @CacheMutate for direct OkHttp use. On a 2xx response, RetrostashOkHttpInterceptor resolves invalidateTemplates against bindings and clears matching cache entries.

Link copied to clipboard
fun ERROR CLASS: Symbol not found for Request.Builder.retrostashQuery(scopeName: String, template: String, bindings: Map<String, String> = emptyMap(), maxAgeMs: Long = 0, tags: List<String> = emptyList()): ERROR CLASS: Symbol not found for Request.Builder

Marks this request as a Retrostash query. Equivalent to @CacheQuery for direct OkHttp use.