Skip to content

Latest commit

 

History

History
70 lines (54 loc) · 2.14 KB

README.md

File metadata and controls

70 lines (54 loc) · 2.14 KB

Ktor KMP File Caching

Tests

This project add a file caching for Ktor client caching.

Currently, there is a Memory caching, it's the default HttpCache behavior of the plugin and a file caching only for Java Target.

The main goal is to make available file caching to many KMP target as possible.

It's based on OKIO dependency and kotlinx serialization.

Example

private val publicStorageCaching = KtorFileCaching()
HttpClient {
    install(HttpCache) {
        publicStorage(publicStorageCaching)
    }
}

Installation

Kotlin JS for browser

implementation("io.github.frankois944:ktorfilecaching-jsbrowser:0.4.2")

Kotlin JS for NodeJS

implementation("io.github.frankois944:ktorfilecaching-jsnode:0.4.2")

other platform

implementation("io.github.frankois944:ktorfilecaching:0.4.2")

Platforms

The current supported targets are :

Target Supported
jvm
js Node
js browser
wasmJS
iosX64
iosArm64
iosSimulatorArm64
macosX64
macosArm64
watchosArm32
watchosArm64
watchosSimulatorArm64
watchosX64
tvosSimulatorArm64
tvosX64
mingwX64
mingwX64
linuxX64
linuxArm64