DylanVann / react-native-fast-image

🚩 FastImage, performant React Native image component.
MIT License
8.1k stars 1.48k forks source link

Questions about potential use case #901

Closed JameelJiwani closed 2 years ago

JameelJiwani commented 2 years ago

I can't seem to find out how the caching works under the hood, and I have a few questions about it.

If the URL changes in the component, it will fetch a new request but will the old image stay cached? Would FastImage make another request if we want to view the original image later by changing the URL back to what it was previously?

If anyone could answer this or direct me toward the code I need to read to get the answer, that would be great!

putuoka commented 2 years ago

old image url will stay cached until you call clearDiskCache

JameelJiwani commented 2 years ago

Thanks! That's exactly what I needed to know