You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following #1139, it's not possible to clear the cache. We did not use lru_cache because the current implementation only uses the first argument as key (because the other one is context?), and lru_cache does not allow that.
In order to use lru_cache we need to ask ourselves if is it right that inference tip functions always take exactly two arguments -- a node and a context? If so, what is context exactly? Does it remain constant during an inference session? Is it fine to hash it via id()?
The interface for clearing astroid's various caches is astroid.MANAGER.clear_cache(). If we missed one, please open a new issue and provide details. Thanks all!
Following #1139, it's not possible to clear the cache. We did not use
lru_cache
because the current implementation only uses the first argument as key (because the other one is context?), and lru_cache does not allow that.In order to use
lru_cache
we need to ask ourselves if is it right that inference tip functions always take exactly two arguments -- a node and a context? If so, what is context exactly? Does it remain constant during an inference session? Is it fine to hash it via id()?See original comment by @superbobry here and here
Current behavior
The cache can be cleared with an API.
Expected behavior
Automatic clearing when the cache increase above a set value (configurable ?).
The text was updated successfully, but these errors were encountered: