docs suggestion for building ProxyBackends that massage data
jvanasco
Branch: jvanasco/dogpile.cache:feature-proxy_docs
Branch: zzzeek/dogpile.cache:master
Merged
Merged pull request
Merged in jvanasco/dogpile.cache/feature-proxy_docs (pull request #36)
This tripped me up a year ago, so I decided to offer a docs update.
It's an example of using a base class to manage the core value-mangling functions, then implementing the proxy via a subclass that merely defines encode/decode. I also added a sidebar explaining some of the value caching behavior.
fwiw, serializing to msgpack -- despite being wrapped in a pickle dogpile -- is cutting our cache size in half.