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

Add synchronous methods #198

Open
davidjamesb opened this issue Dec 23, 2021 · 1 comment
Open

Add synchronous methods #198

davidjamesb opened this issue Dec 23, 2021 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@davidjamesb
Copy link

davidjamesb commented Dec 23, 2021

What problem does the feature solve?

If we add synchronous methods Get/GetOrSet, etc it allows CacheTower functionality to be used outside of asynchronous contexts.

How would you use/interact with the feature? (if applicable)

Exactly the same as the async versions - just synchronously :) Other common implementations E.g. IDistributedCache have both synchronous and asynchronous flavors of methods.

Notes

I wanted to add CacheTower to my stack and for starters - use it for caching expression trees. However, this is all synchronous work - so I went with IMemoryCache/IDistributedCache instead for now.

@davidjamesb davidjamesb added the enhancement New feature or request label Dec 23, 2021
@Turnerj
Copy link
Member

Turnerj commented Dec 27, 2021

Hey @DJBMASTER - thanks for raising the issue!

While I do understand the difficulty as async-over-sync is extremely problematic, supporting synchronous paths for Cache Tower would practically double the amount of code across the project and the maintenance overhead along with it. Every cache layer would need to support it, every extension too.

I'm not saying I won't support synchronous methods in the future but currently it isn't on my roadmap.

@Turnerj Turnerj added this to the v1.0 milestone Oct 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants