react-native-fast-image icon indicating copy to clipboard operation
react-native-fast-image copied to clipboard

Does this cache images to disk or in memory?

Open CDBridger opened this issue 3 years ago • 5 comments

i.e If I view or preload an image from a url, quit the app, go offline, open the app. Will I still see the image? If not is it possible to make that happen?

EDIT: Unsure how to remove bug label

CDBridger avatar Mar 10 '21 22:03 CDBridger

Yeah, you'll still see the image if you've already loaded it and then you open up your app again, offline. I just started using this component simply because React Native's built-in Image component was unreliable when it came to caching. This seems to work out of the box.

darrylyoung avatar Mar 12 '21 14:03 darrylyoung

Technically this package caches in memory by default. There is no way to change this without changing the Glide module config and SDWebImage config. Storing in memory is faster, but can take away memory from other memory-intensive features of your application, especially if you're caching large images. Storing in disk is a bit slower (may result in a brief flash while loading if you don't configure it properly), but leaves more memory for the rest of your app.

dandre-hound avatar Mar 14 '21 14:03 dandre-hound

Is there any where I can find details on the SDWebImage config? I have an offline first app so need the images to be cached to disk.

CDBridger avatar Apr 27 '21 01:04 CDBridger

@CDBridger have you checked their Common Problems wiki? It talks about disk cache config.

dandre-hound avatar Apr 27 '21 16:04 dandre-hound

Where can I find docs for enabling disk storage on android (using Glide of course)?

Edit: Nvm. Found here

mihir0x69 avatar May 26 '22 13:05 mihir0x69

Can we limit the memory size this package can allocate for images?

nes123 avatar Dec 11 '22 23:12 nes123