Could I get a clarification of what exactly gets cached if I set my cache to storing only .storeEncodedImages vs .automatic if I have a processor resizing every image in the app #858
Unanswered
CalebKierum
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am using Nuke in my application and am primarily concerned about offline mode at the moment. I have a few assets which are fetched in a very high resolution and then displayed in the app with various processors to downscale them. For example
Little Profile View:
.resize(width: 100, unit: .pixels)
Big Profile View:
.resize(width: 120, unit: .pixels)
Grid Profile View:
.resize(width: gridCellSize.width, unit: .pixels)
Lets say I had my cache set to
.storeEncodedImages
and that the original image is 2048x2048 (huge) and that gridCellSize.width is constant. My imagining is that with this setting the cache would only store three images. An encoded 100x100, 120x120, and gridCellSize.widthxgridCellSize.width item in the cache and would never store the original 2048x2048 image. Is this correct?Lets then imagine the device goes offline. Something causes the calculation for gridCellSize.width to change. What would nuke do if the cache were set to
storeEncodedImages
? I would guess it would not display anything because it does not have the original to downscale but it would still be able to display the 100, and 120 sized one.In contrast if I set it to .automatic I would have the 2048x2048 image stored offline as well in the cache. This means that if gridCellSize.width were to change Nuke has everything it needs to render a new derivative. Is this correct?
Beta Was this translation helpful? Give feedback.
All reactions