#29867: Allow cache.get_or_set() to cache a None result
-------------------------------------+-------------------------------------
     Reporter:  Phill Tornroth       |                    Owner:  Nick Pope
         Type:  Bug                  |                   Status:  closed
    Component:  Core (Cache system)  |                  Version:  master
     Severity:  Normal               |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"bb64b99b78a579cb2f6178011a4cf9366e634438" bb64b99b]:
 {{{
 #!CommitTicketReference repository=""
 revision="bb64b99b78a579cb2f6178011a4cf9366e634438"
 Fixed #29867 -- Added support for storing None value in caches.

 Many of the cache operations make use of the default argument to the
 .get() operation to determine whether the key was found in the cache.
 The default value of the default argument is None, so this results in
 these operations assuming that None is not stored in the cache when it
 actually is. Adding a sentinel object solves this issue.

 Unfortunately the unmaintained python-memcached library does not support
 a default argument to .get(), so the previous behavior is preserved for
 the deprecated MemcachedCache backend.
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29867#comment:15>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/072.ad2ebed99372d7d75bc5a6c45bf4a7bd%40djangoproject.com.

Reply via email to