Changes between Initial Version and Version 2 of Ticket #29867


Ignore:
Timestamp:
Oct 19, 2018, 8:16:47 AM (6 years ago)
Author:
Phill Tornroth
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29867

    • Property Triage Stage UnreviewedAccepted
    • Property Summary cache.get_or_set won't cache None resultsAllow cache.get_or_set() to cache a None result
  • Ticket #29867 – Description

    initial v2  
    1010    if callable(default):
    1111        default = default()
    12     if default is not None:
    13         self.add(key, default, timeout=timeout, version=version)
    14         # Fetch the value again to avoid a race condition if another
    15         # caller added a value between the first get() and the add()
    16         # above.
    17         return self.get(key, default, version=version)
     12       
     13    self.add(key, default, timeout=timeout, version=version)
     14    # Fetch the value again to avoid a race condition if another
     15    # caller added a value between the first get() and the add()
     16    # above.
     17    return self.get(key, default, version=version)
    1818}}}
    1919
Back to Top