Cleaning up some more in the attrcache cleaner.
This commit is contained in:
parent
ffbc1ad0e7
commit
82b82318d5
1 changed files with 5 additions and 2 deletions
|
|
@ -284,11 +284,14 @@ if _ENABLE_LOCAL_CACHES:
|
||||||
"""
|
"""
|
||||||
global _ATTR_CACHE
|
global _ATTR_CACHE
|
||||||
if obj:
|
if obj:
|
||||||
for attrname, attrobj in _ATTR_CACHE[hashid(obj)].items():
|
for attrobj in _ATTR_CACHE[hashid(obj)].values():
|
||||||
attrobj.no_cache = True
|
attrobj.no_cache = True
|
||||||
del _ATTR_CACHE[hashid(obj)]
|
del _ATTR_CACHE[hashid(obj)]
|
||||||
else:
|
else:
|
||||||
# clean cache completely
|
# clean cache completely
|
||||||
|
for objcache in _ATTR_CACHE.values():
|
||||||
|
for attrobj in objcache.values():
|
||||||
|
attrobj.no_cache = True
|
||||||
_ATTR_CACHE = defaultdict(dict)
|
_ATTR_CACHE = defaultdict(dict)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue