diff options
| author | Nick Pope <nick.pope@flightdataservices.com> | 2020-12-14 10:42:22 +0000 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-12-17 09:57:21 +0100 |
| commit | bb64b99b78a579cb2f6178011a4cf9366e634438 (patch) | |
| tree | 7c20092227eb3038ba7ca664112064bb16ed516a /docs/releases/3.2.txt | |
| parent | d23dad5778b3610a5f870b4757ba628780924dd1 (diff) | |
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.
Diffstat (limited to 'docs/releases/3.2.txt')
| -rw-r--r-- | docs/releases/3.2.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/releases/3.2.txt b/docs/releases/3.2.txt index 5b1969698c..8cd77ffad0 100644 --- a/docs/releases/3.2.txt +++ b/docs/releases/3.2.txt @@ -681,6 +681,14 @@ Miscellaneous ``UserChangeForm.clean_password()`` is no longer required to return the initial value. +* The ``cache.get_many()``, ``get_or_set()``, ``has_key()``, ``incr()``, + ``decr()``, ``incr_version()``, and ``decr_version()`` cache operations now + correctly handle ``None`` stored in the cache, in the same way as any other + value, instead of behaving as though the key didn't exist. + + Due to a ``python-memcached`` limitation, the previous behavior is kept for + the deprecated ``MemcachedCache`` backend. + .. _deprecated-features-3.2: Features deprecated in 3.2 |
