Comments (2)
@msbit @cortinico I did a bit of debugging .
In android we are using Fresco for images, after fetching image from Disk it caches it in memory .
So even if you delete the file from disk it will be served direct from bitMapMemoryCache.
We can test it adding this in ReactImageView.java
Fresco.getImagePipeline().evictFromMemoryCache(mImageSource.getUri()); // mImageSource.getUri() is the image url
Fresco.getImagePipeline().evictFromDiskCache(mImageSource.getUri());
I propose we should provide a method like Image.deleteCache([uri])
So that user can control what need to be served from disk or cache
Let me know your thoughts, i am happy to raise a PR for the same.
from react-native.
Thanks for the investigation @deepanshushuklad11
Fresco.getImagePipeline().evictFromMemoryCache(mImageSource.getUri()); // mImageSource.getUri() is the image url Fresco.getImagePipeline().evictFromDiskCache(mImageSource.getUri());
The user can just invoke these methods instead if they need to evict the cache. We don't need an API on React Native to do so (hence I'm closing this).
I would argue that you should instead opne a issue against facebook/fresco to ignore caching for file://*
URIs.
from react-native.
Related Issues (20)
- ScrollView doesn't scroll when overflows the parent view HOT 4
- Trying to add unknown view tag HOT 5
- Open Debugger button is missing when Hermes is disabled HOT 5
- Issue with ScrollView and position: absolute in React Native 0.72.4 HOT 5
- Apperance.getColorScheme() returns incorrect value if app opened in background (e.g. using Healthkit.HKObserverQuery) HOT 7
- Incorrect TextInput email field suggestion for "Hide my Email" (iOS)
- [0.75.0] Failed to download template when init new app HOT 14
- 【Android】There is a delay in calculating the height of Modal content HOT 6
- returnkeytype do not work immediately HOT 3
- react-native build-ios error: unknown option '--device' HOT 5
- [android] Plugin [id: 'com.facebook.react.settings'] was not found in any of the following sources HOT 23
- Minimum supported Gradle version is 8.7. Current version is 8.6. RN 0.74.3 HOT 27
- [Android] Emiting Events from HeadlessTask on Android in New Arch + Bridgeless + interop layer HOT 2
- Flatten margin styles are not properly overriding when applied from specific to general properties HOT 8
- Cannot build project after a clean setup without expo HOT 11
- Unable to use react-native SDK ( .aar created from react-native app) in other react-native applications HOT 2
- Error with GeneratePackageListTask when build for Android HOT 28
- StatusBar Area Turns Black When Hidden Instead of Inheriting Background Color HOT 16
- Cannot inherit from final 'com.facebook.react.views.imagehelper.ImageSource' HOT 7
- App does not run at all in Android for React Native Version 75.1 or React Native 74.3 HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native.