CacheSerializer

interface CacheSerializer<T>

Abstraction for serialization Implementing classes should be created in their own modules so that consumers may compose their preferred implementations

Functions

Link copied to clipboard
abstract fun decodeFromByteArray(bytes: ByteArray?): T?

decodeFromByteArray attempts to convert a ByteArray into type T Any required dependencies should be provided via the constructor of the implementing class

Link copied to clipboard
abstract fun toByteArray(data: T?): ByteArray

toByteArray converts data of type T to a ByteArray Any required dependencies should be provided via the constructor of the implementing class