I’m using Ktor to call API in my android app in kotlin and now I want to cache the response so that I can use app even if it is offline, how to do that ??
I have used HttpCache but that didn’t work
install(HttpCache) { val cacheFile = Files.createDirectories(Paths.get(System.getProperty("java.io.tmpdir"), "ktor_cache")).toFile() publicStorage(FileStorage(cacheFile)) }
You need to sign in to view this answers
Leave feedback about this