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

Support for GzProtoBufSerializer #173

Open jbparker opened 7 years ago

jbparker commented 7 years ago

Similar to the JSON ability with GzJsonCacheSerializer, this feature adds the ability to compress ProtoBuf streams before performing serialization for distributed caching.

I have code running as a custom serializer for this, but I cannot model it in the same manner of GzJsonCacheSerializer works as the ProtoBufSerializer class is internal.

@MichaCo I wanted to check with you before making a PR to see if this would be desirable to have in the mainline source (or anything similar that would accomplish the same thing).

Thanks for this great library.

MichaCo commented 7 years ago

Hi @jbparker, I thought about that already and yes, adding compression to ProtoBuf makes sense as an option I think.

That being said, CacheManager also supports MS Bond now and there are already 3 variants of it. I'd rather add a compressed configuration flag instead of another type for a gz version. This would be a much larger change though.

Anyways, feel free to send a PR ;)

jbparker commented 7 years ago

I'd rather add a compressed configuration flag instead of another type for a gz version. This would be a much larger change though.

I feel the same. I don't mind it being larger in scope to make the "right change". That said, I will try to keep the changes as narrow as possible.

Thanks for your time!