Closed edi closed 6 years ago
Here is a video explaining the situation. Basically, the image still exists in the former path, but since the App ID changes ( when react packager is restarted ), it can't find the specified image in the new path. Problem is ... should this mean that the image is not actually cached, then just treat it as a new source ? Download then cache URL ?
Yes, check PR thread #91
I believe this is resolved in https://github.com/kfiroo/react-native-cached-image/pull/97 right?
Yep. That fixes it. Used a workaround meanwhile, thanks for merging :)
Everytime I start the packager, there is a new "Application ID" assigned, as follows:
file:///Users/edi/Library/Developer/CoreSimulator/Devices/9869345A-6659-4046-8895-D6D836387159/data/Containers/Data/Application/55A012FC-FDE3-4D23-84C9-CBE93E969303/Library/Caches/imagesCacheDir/firebasestoragegoogleapiscom/f079e0867f7ab8321e93eb35f5678238019f2255.jpg
Note that "current" Application ID is 55A012FC-FDE3-4D23-84C9-CBE93E969303. That's all good, everything works fine. But, everytime I restart the packager, this App ID changes ( of course, this is how it probably works ).
For that specific picture, I found the "original" path this image was created in, CFB84FBD-4763-4DF9-892F-EC53D6E58A2F -- This was the AppID generated yesterday probably...
What seems weird is that, if there's a different path, why doesn't this extension just cache the new file ? Wouldn't this imply the file doesn't exist at the "generatedPath" therefore, download and cache ?
Regards!