CacheDataSource.EventListener


interface CacheDataSource.EventListener


Listener of CacheDataSource events.

Summary

Public functions

Unit

Called when the current request ignores cache.

Unit
onCachedBytesRead(cacheSizeBytes: Long, cachedBytesRead: Long)

Called when bytes have been read from the cache.

Public functions

onCacheIgnored

fun onCacheIgnored(@CacheDataSource.CacheIgnoredReason reason: Int): Unit

Called when the current request ignores cache.

Parameters
@CacheDataSource.CacheIgnoredReason reason: Int

Reason cache is bypassed.

onCachedBytesRead

fun onCachedBytesRead(cacheSizeBytes: Long, cachedBytesRead: Long): Unit

Called when bytes have been read from the cache.

Parameters
cacheSizeBytes: Long

Current cache size in bytes.

cachedBytesRead: Long

Total bytes read from the cache since this method was last called.