It's not really possible in Django to force this as each library will implement that in a different way (or may not even support the binary protocol). Django adding validation is easy, unlikely to cause issues, and makes all usage safe unless the user explicitly overrides the behaviour.
Plus, Django actually implements these checks for non-Memcached backends, raising warnings if keys aren't Memcached compatible. This is done because very often in local development users might run the "local memory" cache backend, which is just a Python dict. In this case they probably want to know that what they're doing won't work when it gets to Memcached in production.
danpalmer|5 years ago
Plus, Django actually implements these checks for non-Memcached backends, raising warnings if keys aren't Memcached compatible. This is done because very often in local development users might run the "local memory" cache backend, which is just a Python dict. In this case they probably want to know that what they're doing won't work when it gets to Memcached in production.