Skip to content

Commit

Permalink
update redis serializer docstring (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
northernSage authored Apr 28, 2023
1 parent e0c642c commit eafb40b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/cachelib/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ class RedisSerializer(BaseSerializer):
"""Default serializer for RedisCache."""

def dumps(self, value: _t.Any, protocol: int = pickle.HIGHEST_PROTOCOL) -> bytes:
"""Dumps an object into a string for redis. By default it serializes
integers as regular string and pickle dumps everything else.
"""
"""Dumps an object into a string for redis, using pickle by default."""
return b"!" + pickle.dumps(value, protocol)

def loads(self, value: _t.Optional[bytes]) -> _t.Any:
Expand Down

0 comments on commit eafb40b

Please sign in to comment.