RetrostashOkHttpAndroid
object RetrostashOkHttpAndroid
Android convenience factories for RetrostashOkHttpBridge.
Combines an AndroidRetrostashStore (Context-backed disk + SharedPreferences index) with the bridge so callers don't need to wire the store manually. JVM-only consumers should construct RetrostashOkHttpBridge directly.
Functions
Link copied to clipboard
fun clear(context: ERROR CLASS: Symbol not found for Context, config: RetrostashOkHttpConfig = RetrostashOkHttpConfig())
Clears the entire on-disk cache for the namespace defined by config. Suitable for "logout" flows where every cached entry must go. Cheaper than instantiating a bridge just to call store.clear().
Link copied to clipboard
fun create(context: ERROR CLASS: Symbol not found for Context, config: RetrostashOkHttpConfig = RetrostashOkHttpConfig()): RetrostashOkHttpBridge
Creates a RetrostashOkHttpBridge backed by an AndroidRetrostashStore.
Link copied to clipboard
fun install(builder: OkHttpClient.Builder, context: ERROR CLASS: Symbol not found for Context, config: RetrostashOkHttpConfig = RetrostashOkHttpConfig()): RetrostashOkHttpBridge
Creates a bridge and installs its interceptors onto builder. Returns the bridge so callers can keep a reference for direct invalidation later.