Replies: 1 comment
-
I agree that it would be nice to include a mechanism for changing the cache limits on a per-app basis. This would allow developers to fine-tune the caching behavior of their apps to meet their specific needs. Here are a few ideas for how this could be implemented:
I think the best approach would depend on the specific needs of the React Native community. However, I believe that it is important to provide developers with the ability to control the caching behavior of their apps. Here are some additional details about how the cache limits could be implemented:
I believe that these features would make React Native a more powerful and flexible platform for developing image-heavy apps. |
Beta Was this translation helpful? Give feedback.
-
The built-in
<Image />
component is backed by a solid caching layer, meaning that frequently-used images will be cached for use later. The cache respects standard HTTP caching headers, and therefore works very well without any up-front configuration from the app side.That being said, out of the box React Native applies cache limits that may not be the most appropriate for individual apps. Image-heavy apps, for example, may wish to increase these cache limits to more aggresively cache images for (e.g.) better offline support.
It would be nice to include a mechanism for changing these limits on a per-app basis.
Beta Was this translation helpful? Give feedback.
All reactions