peekQuery

fun peekQuery(apiClass: ERROR CLASS: Symbol not found for Class<*>, template: String, bindings: Map<String, Any?>, bodyBytes: ByteArray? = null): ByteArray?

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.

Decode with whatever serializer you used to write the entry (the interceptor uses the raw network bytes). Example with kotlinx.serialization:

val raw = bridge.cache.peekQuery(UserApi::class.java, "users/{id}", mapOf("id" to "42"))
?: return // not cached
val user: UserDto = Json.decodeFromString(raw.decodeToString())

bodyBytes is only needed when template contains a placeholder that's not in bindings and must be resolved from a JSON-encoded request body. Most peek calls leave it null.