Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distributed cache #63

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

alastairtree
Copy link
Owner

No description provided.

@alastairtree
Copy link
Owner Author

There is loads of great work in here, thank you! I like the mongo db BSON serialisation and implementation in the cache provider.

The approach you have taken is to pretty much create a new version of LazyCache but backed by IDistributedCacahe. What would be the benefits of using this over just using IDistributedCacahe directly? Do you still get any of the lazy behaviour?

When I was thinking about it originally I was wondering if there was a way to give users a way to start on an in-memory cache and then upgrade to distributed with a small config change rather than having a changed API surface. We could also add a hybrid model with both in-memory and distributed cache if they shared the same IAppCache contract. I think i might need to take some time to have a look a bit deeper and consider the best way to pull in something like this.

@jnyrup
Copy link
Contributor

jnyrup commented Mar 25, 2019

Would it be possible to add this as an extension package, i.e. LazyCache.Distributed, to avoid adding the extra dependencies?

@alexdobarganes
Copy link

To be honest, I think with this impl the Lazy part is lost and that's something I don't want to happen. So that leads me to consider the use of what you mentioned a Hybrid Mechanism that will allow the cache to be stored initially in memory and then once the value is obtained in the DistributedCache!

@alexdobarganes
Copy link

By the way there are some test not passing. I think they are more related to the MemoryCache

adobarganes1 added 2 commits March 25, 2019 16:59
added sample to console project
added hybrid extensions
@alexdobarganes
Copy link

Got some changes take a look all test passed but we can't use the check by reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants