Check if file in mem cache exists #190
Merged
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.
Could fix #135
✨ What kind of change does this PR introduce? (Bug fix, feature, docs update...)
Bug fix
Currently the store doesn't check if a file exists when it has a CacheObject in memory.
When the file is removed by the file system the store still returns it as though the file does exist.
🆕 What is the new behavior (if this is a feature change)?
When return the object in memory it checks if the file exists and doesn't return it otherwise.
💥 Does this PR introduce a breaking change?
No
🐛 Recommendations for testing
I tested the example app with the flow in #135 (comment)
In the old situation I could clear the cache and the app still says it loads the file from cache. In the new situation it downloads the file again.
📝 Links to relevant issues/docs
Fixes #135
🤔 Checklist before submitting