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
functools.lru_cache provides a nice way of caching function returns, and is super useful for things like jimport. As @ctrueden noted, however:
I think @cache is the nicest. It just implies (rightly so) that function results are cached and returned again the second time. Whereas lru_cache(maxsize=None) is an oxymoron to me: if there is no size limit, it's not "LRU" anymore.
This is a good point. Unfortunately, functools.cache is a feature introduced in Python 3.9, while scyjava requires >=3.6 and tests 3.8
Once we move on from these Python versions, we should probably reevaulate the usage of lru_cache on jimport.
The text was updated successfully, but these errors were encountered:
functools.lru_cache
provides a nice way of caching function returns, and is super useful for things likejimport
. As @ctrueden noted, however:This is a good point. Unfortunately,
functools.cache
is a feature introduced in Python 3.9, while scyjava requires >=3.6 and tests 3.8Once we move on from these Python versions, we should probably reevaulate the usage of
lru_cache
onjimport
.The text was updated successfully, but these errors were encountered: