#19221: Cache keys can't be integers
-------------------------------------+------------------------------------
     Reporter:  mhsparks             |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Core (Cache system)  |                  Version:  master
     Severity:  Release blocker      |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+------------------------------------

Comment (by aaugustin):

 Upon further thought, we could take this opportunity to:
 - document that cache keys *must* be strings,
 - document how unicode and byte strings behave: at least with the
 memcached backend, a unicode string and the corresponding utf-8 bytestring
 map to the same cache key; it could be considered a bug that two non-equal
 Python objects map to the same cache key;
 - (maybe) normalize that behavior across cache backends.

 Overall this would result in a simpler and more correct implementation —
 without `smart_str` or `smart_bytes` that often do more work than is
 desirable.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/19221#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to