Prevent caching of responses in Cache.db - #211
Merged
Merged
Conversation
rs
pushed a commit
that referenced
this pull request
Nov 5, 2012
Member
|
Please confirm it fixed the issue for you |
Contributor
Author
|
Unfortunately, this doesn't seem to change anything, Cache.db is still growing when showing images ... |
rs
pushed a commit
that referenced
this pull request
Nov 5, 2012
Prevent caching of responses in Cache.db
rs
pushed a commit
that referenced
this pull request
Nov 5, 2012
Contributor
Author
|
Thanks! |
hawflakes
pushed a commit
to hawflakes/SDWebImage
that referenced
this pull request
Mar 13, 2013
hawflakes
pushed a commit
to hawflakes/SDWebImage
that referenced
this pull request
Mar 13, 2013
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It seems that since iOS 5.0, URL responses also get cached in a file named Cache.db:
http://petersteinberger.com/blog/2012/nsurlcache-uses-a-disk-cache-as-of-ios5/
Because SDWebImage will/can also cache images, you end up using twice the disk space (and IO).
Here are two screenshots showing this behaviour on the simulator and on the device:
http://i.imgur.com/6c2Cv.jpg
http://i.imgur.com/3xWFC.png
I've added a delegate method implementation to avoid caching in Cache.db. Feel free to merge or adopt.