malariagen / malariagen-data-python

Analyse MalariaGEN data from Python
https://malariagen.github.io/malariagen-data-python/latest/
MIT License
13 stars 23 forks source link

Simplify memory caching #469

Open alimanfoo opened 8 months ago

alimanfoo commented 8 months ago

Currently we manually manage in-memory caches for many methods on the Ag3 and Af1 APIs, where results are small but may take noticeable time to compute.

This could potentially be simplified by using the lru_cache and cached_property features of the functools standard library module. See also how do I cache method calls.