You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
correct me if I am wrong but the ImageCache is limited to the application runtime. However, downloaded files persist in the device filesystem even if you close the app. To prevent deprecated cache files to take disk space uselessly, you should call the "clear()" function in your ImageCache constructor (as there is only one instance of ImageCache per app anyway). I think CacheDir returned by react-native-fetch-blob is specific to each app. Else you would also need to include the appID into your BASE_DIR construcor so that cleaning the cache in one app do not clean it for every running app using react-native-img-cache.
Also, having a counter that autoincrement rather than generating random file names (with calls to your s4 function ) for mutable images would be more simple and prevent any unluky ovewrite (aditionnaly, it could be used to clean oldest cache files only based on their name if necessary).
The text was updated successfully, but these errors were encountered:
correct me if I am wrong but the ImageCache is limited to the application runtime. However, downloaded files persist in the device filesystem even if you close the app. To prevent deprecated cache files to take disk space uselessly, you should call the "clear()" function in your ImageCache constructor (as there is only one instance of ImageCache per app anyway). I think CacheDir returned by react-native-fetch-blob is specific to each app. Else you would also need to include the appID into your BASE_DIR construcor so that cleaning the cache in one app do not clean it for every running app using react-native-img-cache.
Also, having a counter that autoincrement rather than generating random file names (with calls to your s4 function ) for mutable images would be more simple and prevent any unluky ovewrite (aditionnaly, it could be used to clean oldest cache files only based on their name if necessary).
The text was updated successfully, but these errors were encountered: