The perf counter for cache_hit should not be increased
when the token is expired and find() returns false to
the caller.
When we return false to the caller it will continue
creating HTTP requests to Keystone and thus it's a
cache miss and not a hit.
Signed-off-by: Tobias Urdin <tobias.urdin@binero.com>
if (entry.token.expired()) {
tokens.erase(iter);
- if (perfcounter) perfcounter->inc(l_rgw_keystone_token_cache_hit);
+ if (perfcounter) perfcounter->inc(l_rgw_keystone_token_cache_miss);
return false;
}
token = entry.token;