CacheManager
CacheManager copied to clipboard
New version / Nuget packages
Any chance to get a new CacheManager version from the current changes in the "dev" branch? Especially the concurrency fix with https://github.com/MichaCo/CacheManager/commit/f2d6e113ad74a22d3ff413addbdf2b442574a0b2 addresses a current production issue on our side.
We too are experiencing the concurrency issues and would very much appreciate a new version.
@matthias-jauernig are you still using this library on prod? We are considering forking the repo to build dlls from dev branch, just wondering if it's stable?
We are using "the library" in prod, but only the main branch. We got around the concurrency issue by wrapping the calls by ourselves.
I see, thanks. Did you create locks per item key or wrapped the call site with a single lock object?
In our case, we are locking by cache item type and cache region (if exists).
public static void AddLocked<T>(this ICacheManager<T> cacheManager, CacheItem<T> cacheItem)
{
string lockKeyForAdd = typeof(T).FullName + (!string.IsNullOrEmpty(cacheItem.Region) ? ('-' + cacheItem.Region) : string.Empty);
try
{
_lockProvider.Wait(lockKeyForAdd);
cacheManager.Add(cacheItem);
}
finally
{
_lockProvider.Release(lockKeyForAdd);
}
}
... where LockProvider
is adapted from https://github.com/Darkseal/LockProvider/
Thanks a lot. We implemented something similar by managing multiple semaphoreslim objects but LockProvider seems to be cleaner.
Is this library still supported - from this conversation it sounds like there are some issues with no updates, etc....
Unfortunately it looks like this project is dead :( I found a discussion also here