Updated openstack/openstack
Project: openstack/oslo-incubator  4cddff24f45ba2dd9271cb800d10b8c10eead85b

Fix MemoryBackend not purging item from _keys_expired on delete

The memory backend for openstack.common.cache uses a dictionary,
"_keys_expired", to track the TTL for individual cache entries.
Keys with the same expiration time are grouped into a set. The
values for each key are stored in a separate dict, "_cache".

When a cache entry is to be deleted, it must be removed from
both "_cache" and "_keys_expired". In the latter case, the
code was attempting to remove the cache entry's *value* from
the key set, rather than the *key* itself.

This patch fixes the bug and introduces a white-box regression
test. A black-box test would not be able to check whether
_keys_expired actually deleted the correct key.

Change-Id: I5ad156e5709b1ce138dcdc4f3ff1dda17c478cab