Changed Blob Cache to use an IBlobCacheProvider #347
Closed
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.
Changed Splat registrations to use an IBlobCacheProvider so how the cache is created can be reused and tapped into more easily. Static caches retain current behavior. Also added some static helpers to BlobCache
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature
What is the current behavior? (You can also link to an open issue here)
How Blob Caches are constructed isn't really exposed at all to a user. If I don't want to to use the static helpers I don't have a great way to reuse how Akavache news up the Blob Caches.
#342
What is the new behavior (if this is a feature change)?
How BlobCaches are created currently can't be reused very easily and overall I think this leads to some difficulty for new users with implementing the life cycle correctly in something like mobile apps. I set it up to register two different types of IBlobCacheProviders.
Does this PR introduce a breaking change?
It shouldn't. If someone was registering on top of the current Splat registrations (i.e. "UserAccount") those should still work just fine
Please check if the PR fulfills these requirements
Other information:
If how I did this is something that is appealing and gets merged I'll add some additional docs around these.
My initial thought was just to add an additional Splat registration with Func's but then I decided to go the provider route
Here is that branch in case anyone is interested
https://github.com/PureWeen/Akavache/tree/added_splat_registration_to_new_up_caches