# CacheWriter.ProgressListener

Artifact: [androidx.media3:media3-datasource](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/datasource/cache/CacheWriter.java+class:androidx.media3.datasource.cache.CacheWriter.ProgressListener)

*** ** * ** ***


```
public interface CacheWriter.ProgressListener
```

<br />

*** ** * ** ***

Receives progress updates during cache operations.

## Summary

| ### Public methods |
|---|---|
| `abstract void` | `https://developer.android.com/reference/androidx/media3/datasource/cache/CacheWriter.ProgressListener#onProgress(long,long,long)(long requestLength, long bytesCached, long newBytesCached)` Called when progress is made during a cache operation. |

## Public methods

### onProgress

```
abstract void onProgress(long requestLength, long bytesCached, long newBytesCached)
```

Called when progress is made during a cache operation.

| Parameters |
|---|---|
| `long requestLength` | The length of the content being cached in bytes, or `https://developer.android.com/reference/androidx/media3/common/C#LENGTH_UNSET()` if unknown. |
| `long bytesCached` | The number of bytes that are cached. |
| `long newBytesCached` | The number of bytes that have been newly cached since the last progress update. |