def at_repeat(self): "called every 2 hours. Sets a max attr-cache limit to 100 MB." # enough for normal usage? if is_pypy: # pypy don't support get_size, so we have to skip out here. return attr_cache_size, _, _ = caches.get_cache_sizes() if attr_cache_size > _ATTRIBUTE_CACHE_MAXSIZE: caches.flush_attr_cache()