Cache

abstract external class Cache(source)

Exposes the JavaScript Cache to Kotlin

Since Kotlin

1.1
abstract external class Cache : JsAny(source)

Exposes the JavaScript Cache to Kotlin

Since Kotlin

1.8

Constructors

Link copied to clipboard
constructor()
constructor()

Functions

Link copied to clipboard
fun add(request: dynamic): Promise<Unit>
Since Kotlin 1.1
fun add(request: String): Promise<Nothing?>
fun add(request: Request): Promise<Nothing?>
Since Kotlin 1.8
Link copied to clipboard
fun addAll(requests: Array<dynamic>): Promise<Unit>
Since Kotlin 1.1
fun addAll(requests: JsArray<JsAny?>): Promise<Nothing?>
Since Kotlin 1.8
Link copied to clipboard
fun delete(request: dynamic, options: CacheQueryOptions = definedExternally): Promise<Boolean>
Since Kotlin 1.1
fun delete(request: String, options: CacheQueryOptions = definedExternally): Promise<JsBoolean>
fun delete(request: Request, options: CacheQueryOptions = definedExternally): Promise<JsBoolean>
Since Kotlin 1.8
Link copied to clipboard
fun keys(request: dynamic = definedExternally, options: CacheQueryOptions = definedExternally): Promise<Array<Request>>
Since Kotlin 1.1
fun keys(request: String, options: CacheQueryOptions = definedExternally): Promise<JsArray<Request>>
fun keys(request: Request, options: CacheQueryOptions = definedExternally): Promise<JsArray<Request>>
Since Kotlin 1.8
Link copied to clipboard
fun match(request: dynamic, options: CacheQueryOptions = definedExternally): Promise<Any?>
Since Kotlin 1.1
fun match(request: String, options: CacheQueryOptions = definedExternally): Promise<JsAny?>
fun match(request: Request, options: CacheQueryOptions = definedExternally): Promise<JsAny?>
Since Kotlin 1.8
Link copied to clipboard
fun matchAll(request: dynamic = definedExternally, options: CacheQueryOptions = definedExternally): Promise<Array<Response>>
Since Kotlin 1.1
fun matchAll(request: String, options: CacheQueryOptions = definedExternally): Promise<JsArray<Response>>
fun matchAll(request: Request, options: CacheQueryOptions = definedExternally): Promise<JsArray<Response>>
Since Kotlin 1.8
Link copied to clipboard
fun put(request: dynamic, response: Response): Promise<Unit>
Since Kotlin 1.1
fun put(request: String, response: Response): Promise<Nothing?>
fun put(request: Request, response: Response): Promise<Nothing?>
Since Kotlin 1.8
Link copied to clipboard

For a Dynamic value caught in JS, returns the corresponding Throwable if it was thrown from Kotlin, or null otherwise.

Since Kotlin 1.8
Link copied to clipboard
fun <T : JsAny> JsAny.unsafeCast(): T

Cast JsAny to other Js type without runtime check

Since Kotlin 1.8