Target filter
Search Kotlin docs
  • Platforms
  • Tealium Prism Kotlin
core/com.tealium.prism.core.api.network/ResourceCache

ResourceCache

interface ResourceCache<T : DataItemConvertible>

Utility class to automatically manage reading and writing resources from a DataStore as well as providing etag storage support.

Properties

etag
Link copied to clipboard
abstract val etag: String?

Reads the etag that's been stored alongside the resource, if one is available.

resource
Link copied to clipboard
abstract val resource: T?

Reads the resource from disk and and returns it after converting it using the provide DataItemConverter

Functions

saveResource
Link copied to clipboard
abstract fun saveResource(resource: T, etag: String?)

Saves the resource and its etag into a DataStore for reading later.

Generated by Dokka
(c) Tealium 2026