Commit 03f8e802 authored by Peterson, Peter's avatar Peterson, Peter
Browse files

Add note about functools.cache

parent 0b1be673
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -43,6 +43,12 @@ To use it, first install git-lfs, then setup the git-submodule
   git submodule init
   git submodule update

Useful Functions
----------------

The [cache](https://docs.python.org/3/library/functools.html#functools.cache) decorator can be used to hold onto returns of functions.
The data is stored in a ``dict`` with the function parameters as the key, and the return as the value.
The cache remains in memory for the lifetime of the pytest run and a [pytest fixture](https://docs.pytest.org/en/7.1.x/how-to/fixtures.html) with more limited scope may be more appropriate.

Access Development Version on Analysis Cluster
----------------------------------------------