facebook / facebook/fresco

Unresolved reference: `mainFileCache`

Open
#2,806 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
17.2k
Forks
3.7k
PR merge metrics
No merged PRs in 30d

Description

### Description

Updated Fresco version from 2.6.0 to 3.4.0.
Function `ImagePipelineFactory.getMainFileCache()` does not exist anymore in 3.4.0.

### Reproduction

```
val imageRequest = ImageRequest.fromUri(url)

val cacheKey = DefaultCacheKeyFactory
.getInstance()
.getEncodedCacheKey(imageRequest, null)

val resource = ImagePipelineFactory
.getInstance()
.mainFileCache // Unresolved reference: mainFileCache
.getResource(cacheKey)

val file = (resource as? FileBinaryResource?)?.file
```

### Solution

How do I change the above code to work in 3.4.0?
It would be helpful if the function was marked as deprecated before completely removing it.

### Additional Information

* Fresco version: 3.4.0
* Platform version: 33

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.