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.34k stars 457 forks source link

Feature/messagepack serializer #230

Open walter-psjr opened 6 years ago

walter-psjr commented 6 years ago

This PR adds the package to support MessagePack serialization. Referent to #229.

MichaCo commented 6 years ago

@walter-psjr I did read a little bit about the library you are using. The only (or main) extension point of that library are the different resolvers, right?

So, I think that should be a configuration point for this implementation, too. You are currently basically hardcoding it to use ContractlessStandardResolverAllowPrivate.

You can pass objects to serializers in CacheManager, custom configuration or anything, see JsonSerializer for example. The configuration extensions could take an optional resolver instance which defaults to what you have right now...

What do you think?

MichaCo commented 6 years ago

Before I review the PR, could you please squash your commits so that the changes do not show up twice in the changed files? Thanks! ;)

walter-psjr commented 6 years ago

Hi @MichaCo, I'm sorry for the delay in answering. I did the commits squash. I left this configuration of the contracts static because I had problems with running the tests and internal classes. I'll take another look, I saw that other people had problems with tests but said that this was solved in the library in December. Thanks for the feedback, I'll try to see this as soon as possible.