MichaCo / CacheManager

CacheManager is an open source caching abstraction layer for .NET written in C#. It supports various cache providers and implements many advanced features.
http://cachemanager.michaco.net
Apache License 2.0
2.33k stars 457 forks source link

Difference between Microsoft.Extension.Caching.* packages #326

Closed bugproof closed 3 years ago

bugproof commented 3 years ago

What advantages does it have over using e.g. Microsoft.Extensions.Caching.StackExchangeRedis and official IDistributedCache and IMemoryCache abstractions?

Some of the disadvantages I see is less control, e.g. forced serialization library https://github.com/MichaCo/CacheManager/issues/278

MichaCo commented 3 years ago

IDistributedCache doesn't have any features other than saving a byte array as far as I know. That's pretty much doing nothing and cannot really be compared to CacheManager. That being said, if you don't need any of the CacheManager specific features and just want to quickly throw your byte arrays into Redis then just use those simple abstractions!

What do you mean with forced serialization? CacheManager has many different serialization implementations which should work for most cases so that you as the user don't have to care about that. That being said, you always have the option to not use a build in serializer and also just cache a byte array and care about serialization somewhere yourself.