CacheManager icon indicating copy to clipboard operation
CacheManager copied to clipboard

New version / Nuget packages

Open matthias-jauernig opened this issue 2 years ago • 8 comments

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.

matthias-jauernig avatar Nov 02 '22 08:11 matthias-jauernig

We too are experiencing the concurrency issues and would very much appreciate a new version.

anthonymbower avatar Jan 19 '23 10:01 anthonymbower

@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?

mertkokusen avatar Mar 23 '23 16:03 mertkokusen

We are using "the library" in prod, but only the main branch. We got around the concurrency issue by wrapping the calls by ourselves.

matthias-jauernig avatar Mar 29 '23 07:03 matthias-jauernig

I see, thanks. Did you create locks per item key or wrapped the call site with a single lock object?

mertkokusen avatar Mar 29 '23 08:03 mertkokusen

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/

matthias-jauernig avatar Mar 29 '23 09:03 matthias-jauernig

Thanks a lot. We implemented something similar by managing multiple semaphoreslim objects but LockProvider seems to be cleaner.

mertkokusen avatar Mar 29 '23 10:03 mertkokusen

Is this library still supported - from this conversation it sounds like there are some issues with no updates, etc....

bbqchickenrobot avatar Sep 11 '23 23:09 bbqchickenrobot

Unfortunately it looks like this project is dead :( I found a discussion also here

Mek7 avatar Apr 22 '24 08:04 Mek7