react-native-image-cache-hoc
react-native-image-cache-hoc copied to clipboard
Permanent CacheableImages should not pull from local cache dir only permanent dir
Currently FileSystem.getLocalFilePathFromUrl() checks if a file exists in either the local cache or permanent directories before hitting the network and saving to the appropriate local dir.
If the permanent prop flag is set to true, we should hit the network even if the file already exists in the local cache dir because cache dir files are ephemeral and the permanent prop should not rely on them (what if the user wants this image to render in a future render even if at that point in time the app does not have internet access).
Better yet, if permanent prop is set and the file exists in the cache dir but not the permanent dir, ignore the network and just copy the local file from cache dir to permanent dir.
it is a bug or future ?
Both?
Nothing is broken, it's just making behavior more in line with expectations.