rsetkus
10/13/2020, 10:28 AMMarc Knaup
10/13/2020, 10:32 AMinstall(HttpCache)
.rsetkus
10/13/2020, 10:34 AMMarc Knaup
10/13/2020, 10:36 AMHttpCache
which is Ktor’s own implementation, but in-memory only.Marc Knaup
10/13/2020, 10:38 AMNSURLRequestReloadIgnoringCacheData
may break revalidation calls though. I’m not sure about that. It should not.rsetkus
10/13/2020, 10:44 AMMarc Knaup
10/13/2020, 10:51 AMHttpCache
you can configure it to use your own HttpCacheStorage
implementation. That implementation needs to load & save requests as told by HttpCache
. So you build on top of HttpCache
instead of re-inventing it 🙂Marc Knaup
10/13/2020, 10:55 AMrsetkus
10/13/2020, 11:00 AMMarc Knaup
10/13/2020, 11:07 AMHttpCacheEntry
instances when loading data from disk but its constructor is internal for some reason.
As a workaround you could force the usage of the internal constructor (@Suppress("INVISIBLE_MEMBER")
- it may break in future Ktor updates) and engage in the ticket to get this improved.Marc Knaup
10/13/2020, 11:14 AMMarc Knaup
10/13/2020, 11:17 AMHttpCache
for now and use the official version again once it was improved.