Closed adambajguz closed 1 month ago
all methods ale synchronous which is very useful for e.g. value objects caching.
True. But first you need to initialize the object. Typically, it is serialized in some form on the disk or database. Deserialization is asynchronous process. Could you explain how the object is creating when it needs to be added to the cache?
Do you plan to add a LRU synchronous cache
LRU
cannot be implemented in a lock-free manner. This is the main disadvantage in contrast to SIEVE algorithm implemented by RandomAccessCache
. ConcurrentCache
use locks even for read-only operations. However, it tries to load-balance the queue drain between the threads.
Probably, the best approach is to offer synchronous cache based on SIEVE (which requires some effort).
I have good news. In the new release of DotNext.Threading
I've added support for synchronous lock acquisition to async-friendly synchronization primitives such as AsyncExclusiveLock
. This fact unlocks the possibility to add synchronous methods to RandomAccessCache
. This is done as well.
Wow, thanks!
Hi, the
ConcurrentCache
is currently marked as obsolete asRandomAccessCache
was created. However, theConcurrentCache
has one big adventage - all methods ale synchornous which is very useful for e.g. value objects caching.Do you plan to add a LRU synchronous cache or remove the obsolete attribute?