Package com.google.android.exoplayer2.upstream.cache

## Interface CacheDataSource.EventListener

- Enclosing class:
    CacheDataSource

      public static interface CacheDataSource.EventListener

  Listener of `CacheDataSource` events.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `onCachedBytesRead​(long cacheSizeBytes, long cachedBytesRead)` | Called when bytes have been read from the cache.
    `void` | `onCacheIgnored​(int reason)` | Called when the current request ignores cache.

- - ### Method Detail

    - #### onCachedBytesRead

          void onCachedBytesRead​(long cacheSizeBytes,
                                 long cachedBytesRead)

      Called when bytes have been read from the cache.
      Parameters:
        `cacheSizeBytes` - Current cache size in bytes.
        `cachedBytesRead` - Total bytes read from the cache since this method was last called.

    - #### onCacheIgnored

          void onCacheIgnored​(@CacheIgnoredReason
                              int reason)

      Called when the current request ignores cache.
      Parameters:
        `reason` - Reason cache is bypassed.