This repository was archived by the owner on Aug 24, 2019. It is now read-only.
Disk-only cache writing and ability to flush memory cache#14
Open
dherberger wants to merge 7 commits intosoffes:masterfrom
Open
Disk-only cache writing and ability to flush memory cache#14dherberger wants to merge 7 commits intosoffes:masterfrom
dherberger wants to merge 7 commits intosoffes:masterfrom
Conversation
…r pre-caching objects from network responses that may not be immediately used
… -- calling this selector appears to remove the cache directory entirely, resulting in failure to make subsequent insertions into the properly named subfolder on disk
Removing call to delete cache directory for a SAMCache named instance --...
…e saving operation is asynchronous, adding selector to allow for disk queue writing completion callback
…ory cache while keeping the disk cache intact, added unit test coverage for the new selectors
Author
|
Hi @soffes -- Thanks for pulling in some of my previous edits/contributions! I'm a big fan of your work. :) When you have some spare time, please review this pull request -- It adds a few additional things that have come in great handy on projects. Cheers! |
Owner
|
Looks really good @dherberger! Can you review @calebd? |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Adding selectors to allow disk-only cache insertion; this is handy for pre-caching objects that may not be immediately used (for example, objects constructed from network responses).
This includes edits to update the comments on the 'setObject:' selectors for indicating the asynchronous nature of writing to the disk (as opposed to the synchronous insertion into the memory cache), along with an overloaded selector for specifying a callback block to listen for the completion of disk writing operations.
Also including an edit to expose a 'flushMemoryCache' selector that allows consumers of this cache to clear out the memory cache at will -- this does not remove the disk-cached items. This is useful for closing out memory usage in situations where it is unlikely that an end user will revisit the cached information in a short period of time, but still requires the ability to recall disk-cached information at a later point in time without re-populating the cache entirely.
Also includes test coverage.