CacheKeyGenerator

interface CacheKeyGenerator

An CacheKeyGenerator is responsible for finding an id for a given object

  • takes Json data as input and returns a unique id for an object

  • is used after a network request

  • is used during normalization when writing to the cache

See also @typePolicy See also CacheResolver

Functions

Link copied to clipboard
abstract fun cacheKeyForObject(obj: Map<String, Any?>, context: CacheKeyGeneratorContext): CacheKey?

Returns a CacheKey for the given object or null if the object doesn't have an id

Inheritors

Link copied to clipboard