Set the values for the request_local_cache
Instead of only using the request_local_cache when an explicit set
occurs, make sure we always set the value for the request_local_cache
when we have to reach for the proxied backend.
The Context Local cache was being used previously when we were seeing
a mix of cache misses and hits. This change ensures we now always
set the value(s) as expected:
Change-Id: I4857cfe1e62d54c3c89a0206ffc895c4cf681ce5
Closes-Bug: #1567403
(cherry picked from commit 9b9bc7767f
)
This commit is contained in:
parent
831e899572
commit
0fcc14666f
2
keystone/common/cache/_context_cache.py
vendored
2
keystone/common/cache/_context_cache.py
vendored
@ -94,6 +94,8 @@ class _ResponseCacheProxy(proxy.ProxyBackend):
|
||||
value = self._get_local_cache(key)
|
||||
if value is api.NO_VALUE:
|
||||
value = self.proxied.get(key)
|
||||
if value is not api.NO_VALUE:
|
||||
self._set_local_cache(key, value)
|
||||
return value
|
||||
|
||||
def set(self, key, value):
|
||||
|
Loading…
Reference in New Issue
Block a user