Memcached backend: pass parameters to memcache backend
|Reported by:||erny||Owned by:||otherjacob|
|Component:||Core (Cache system)||Version:||1.0|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
- Django instantiates memcache client w/o parameters, i.e. pickleProtocol=0
- I compress a string to < 512K, binary pickle format
- I encapsulate it inside a dummy object to prevent getting it converted to unicode
- I pass it to cache.set
- django does the set w/o min_compress_len.
- Then python-memcache.set does (indirectly) o dumps with pickleProtocol=0, which results in a my < 512K to a >1,4M string and is silently discarted as max is 1 MB.
- django memcached passes pickleProtocol option to memcached backend client
- django memcached does implement splitting into chunks
- I split it into smaller parts in the dummy objects