##// END OF EJS Templates
caches: don't try to delete keys if there aren't any to delete....
marcink -
r2969:c92b412f default
parent child Browse files
Show More
@@ -187,8 +187,10 b' def get_or_create_region(region_name, re'
187 def clear_cache_namespace(cache_region, cache_namespace_uid):
187 def clear_cache_namespace(cache_region, cache_namespace_uid):
188 region = get_or_create_region(cache_region, cache_namespace_uid)
188 region = get_or_create_region(cache_region, cache_namespace_uid)
189 cache_keys = region.backend.list_keys(prefix=cache_namespace_uid)
189 cache_keys = region.backend.list_keys(prefix=cache_namespace_uid)
190 region.delete_multi(cache_keys)
190 num_delete_keys = len(cache_keys)
191 return len(cache_keys)
191 if num_delete_keys:
192 region.delete_multi(cache_keys)
193 return num_delete_keys
192
194
193
195
194 class ActiveRegionCache(object):
196 class ActiveRegionCache(object):
General Comments 0
You need to be logged in to leave comments. Login now