react-native-clcasher fetches data from the AsyncStorage every time, and there seems to be a performance penalty in doing that.
In our case it caused the renderLoader to be executed everytime.
I made a small wrapper over clcacher that stores values in memory for faster fetching, while persistently caching them with clcasher.
https://github.com/bajceta/react-native-in-memory-persisted-cache/blob/master/index.js
This PR enables passing 'urlCache' to ImageCacheProvider in order to use this implementation.
Example of usage:
import MemoryPersistedCache from 'react-native-in-memory-persisted-cache';
...
<ImageCacheProviderPreloaded urlCache={MemoryPersistedCache}>
react-native-clcasher
fetches data from theAsyncStorage
every time, and there seems to be a performance penalty in doing that. In our case it caused the renderLoader to be executed everytime. I made a small wrapper over clcacher that stores values in memory for faster fetching, while persistently caching them with clcasher. https://github.com/bajceta/react-native-in-memory-persisted-cache/blob/master/index.jsThis PR enables passing 'urlCache' to
ImageCacheProvider
in order to use this implementation.Example of usage: