Make the cache provider an injectable dependency#20
Make the cache provider an injectable dependency#20pknotfound merged 5 commits intopknotfound:masterfrom
Conversation
|
Hello @Mek101 Can you please include the code where you use your injectable dependency of cache provider? Thank you |
|
You mean in the example application? |
|
Yes. Your solution works alright, but has one potential issue which I see. If the user wishes to implement caching, they need to create a class on their own and pass it as a parameter, but what if a user wishes to use the default shared preferences rather than creating one on their own. Also, this solution eliminates the ability for the user to choose if they wish to implement caching or not. What are your thoughts? Thanks |
They can simple create a
The I also added how to use the default provider with in the example application |
|
I also made the member functions of |
|
@Mek101 I will test out your changes soon. Thank you |
|
@Mek101 Merging your changes |
This removes the hard-dependency on SharedPreference as a cache implementation and allows the user to supply their own