docs/doc/reference/com/google/android/exoplayer2/upstream/cache/CacheKeyFactory.html
Package com.google.android.exoplayer2.upstream.cache
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public interfaceCacheKeyFactory
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
Factory for cache keys.
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static CacheKeyFactory | DEFAULT |
Deprecated.
Default CacheKeyFactory.
|
All Methods Instance Methods Abstract Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| String | buildCacheKey(DataSpec dataSpec) |
Deprecated.
Returns the cache key of the resource containing the data defined by a DataSpec.
|
-
static final[CacheKeyFactory](CacheKeyFactory.html "interface in com.google.android.exoplayer2.upstream.cache")DEFAULT
Deprecated.
Default CacheKeyFactory.
-
[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")buildCacheKey([DataSpec](../DataSpec.html "class in com.google.android.exoplayer2.upstream")dataSpec)
Deprecated.
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 DataSpec.position and DataSpec.length.
Parameters:dataSpec - The DataSpec.Returns:The cache key of the resource.