Why remove sync methods? #507
Replies: 1 comment 2 replies
-
Hi @twbaltimore This library has born with few methods on the begging (Get, set and not much else). Right now there are tons of methods and maintaining all of them twice (sync and async version) is a bit expensive for me also no-one before you asked to have sync support (we removed it years ago). My suggestion is to work on I'm sure you can understand the motivation. |
Beta Was this translation helpful? Give feedback.
-
I would like to make the recommendation that sync versions of methods be re-introduced into this library. The lack of sync methods forces adopters of this package to invoke the async versions here in a sync over async fashion, such as the following:
var result = cache.GetAsync(key).GetAwaiter().GetResult().ConfigureAwait(false);
The current thread blocks and is idle and potentially another thread is consumed unnecessarily leading to a less efficient, less responsive application/service. It would be better to maintain sync versions of the methods that can continue to be used in synchronous scenarios.
Beta Was this translation helpful? Give feedback.
All reactions