by gsu2 · 6y ago · 0 comments
The length check would still be necessary, but spaces (and other arbitrary bytes) would no longer break things.
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.