Custom Serializer ?
As I look at expanding a project with increasing components ( Pyramid Web + Twisted Daemons + (sadly) PHP ), interoperability is becoming a bit of a concern.
Looking through the backends:
- serializes - util.pickle.dumps(value)
- deserialze - util.pickle.loads(value)
- [ util.pickle is cPickle or pickle ]
- serializes & deserialize are handled within the various 3rd party modules ( largely pickle )
- native storage
- serializes - pickle.dumps(value)
- deserialze - pickle.loads(value)
- [ pickle is dogpile.cache.util's pickle ]
Would you consider a patch that does the following:
- CacheRegion accepts a 'SerializationAPI' object
- the SerializationApi has two methods -
- the 'SerializationApi' defaults to the current behavior ( pickle )
- one could create a custom scheme and pass it in ( ie, json or something else )
While I don't think this would do much for the memcached libraries ( though some are looking at the same custom serialization options ), it would allow the file-backed dbm/ndbm and redis backends to be more interoperable.