Allowing different types of serialization per client #287

Merged
merged 3 commits into from Nov 22, 2012

Projects

None yet

3 participants

@naseem

This change moves the configuration for serializer from being a class-level accessor to being client-specific. So you can set up different clients to use different serializers using the :serializer option on client creation.

The default is still Marshal.

@brianmario
Collaborator

Not a bad idea to have it be configurable per client. While we're at it it may be worth it (in another pull request) to make the new compression swap API be per client as well?

@mperham mperham and 1 other commented on an outdated diff Nov 14, 2012
lib/dalli/server.rb
# NOTE: Additional public methods should be overridden in Dalli::Threadsafe
private
+ def serializer=(serializer)
@mperham
mperham Nov 14, 2012

I don't believe this method is necessary.

@naseem
naseem Nov 14, 2012

Good catch, fixed.

@naseem

@brianmario Not as familiar with the compressor code but I gave it a shot here: #289

@mperham mperham merged commit 4290827 into petergoldstein:master Nov 22, 2012

1 check passed

Details default The Travis build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment