Show More
@@ -102,6 +102,5 b' def get_or_create_region(region_name, re' | |||||
102 | def clear_cache_namespace(cache_region, cache_namespace_uid): |
|
102 | def clear_cache_namespace(cache_region, cache_namespace_uid): | |
103 | region = get_or_create_region(cache_region, cache_namespace_uid) |
|
103 | region = get_or_create_region(cache_region, cache_namespace_uid) | |
104 | cache_keys = region.backend.list_keys(prefix=cache_namespace_uid) |
|
104 | cache_keys = region.backend.list_keys(prefix=cache_namespace_uid) | |
105 | for k in cache_keys: |
|
105 | region.delete_multi(cache_keys) | |
106 | region.delete(k) |
|
|||
107 | return len(cache_keys) |
|
106 | return len(cache_keys) |
@@ -74,8 +74,7 b' class TestCaches(object):' | |||||
74 | def test_store_value_in_cache(self): |
|
74 | def test_store_value_in_cache(self): | |
75 | cache_region = rc_cache.get_or_create_region('cache_perms') |
|
75 | cache_region = rc_cache.get_or_create_region('cache_perms') | |
76 | # make sure we empty the cache now |
|
76 | # make sure we empty the cache now | |
77 |
|
|
77 | cache_region.delete_multi(cache_region.backend.list_keys()) | |
78 | cache_region.delete(key) |
|
|||
79 |
|
78 | |||
80 | assert cache_region.backend.list_keys() == [] |
|
79 | assert cache_region.backend.list_keys() == [] | |
81 |
|
80 |
General Comments 0
You need to be logged in to leave comments.
Login now