-
-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Labels
enhancementNew feature or requestNew feature or requestfeature requestRequest a new featureRequest a new feature
Description
Following the discussion in #11 and the improvement done in #63, where custom serializers were added for each cache backend. I think that it would be very nice to have a few generic serializers (Pickle, JSON, etc) that could be passed as a parameter when initialising the cache backends.
Something that would look like:
from cachelib import FileSystemCache, RedisCache
from cachelib.serializers import JsonSerializer, PickleSerializer
redis_cache = RedisCache(serializer=JsonSerializer)
file_cache = FileSystemCache(serializer=PickleSerializer)
Each backend cache would obviously have a default serializer for backwards compatibility.
This would allow using more secure serialization alternatives than Pickle.
The ultimate goal that I would like to achieve would be to be able to use a custom serializer with the Flask-Caching library.
I could try to work out a solution for this and submit a PR if you think this approach would make sense.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestfeature requestRequest a new featureRequest a new feature