@UnstableApi
interface CacheKeyFactory


Factory for cache keys.

Summary

Constants

const CacheKeyFactory!

Default CacheKeyFactory.

Public functions

String!
buildCacheKey(dataSpec: DataSpec!)

Returns the cache key of the resource containing the data defined by a DataSpec.

Constants

DEFAULT

const val DEFAULTCacheKeyFactory!

Default CacheKeyFactory.

Public functions

buildCacheKey

fun buildCacheKey(dataSpec: DataSpec!): String!

Returns the cache key of the resource containing the data defined by a DataSpec.

Note that since the returned cache key corresponds to the whole resource, implementations must not return different cache keys for DataSpecs that define different ranges of the same resource. As a result, implementations should not use fields such as position and length.

Parameters
dataSpec: DataSpec!

The DataSpec.

Returns
String!

The cache key of the resource.