For a python application including the following modules:
commons.py
@lru_cache(maxsize=2)
def memoized_f(x):
...
pipeline_a.py
from commons import memoized_f
x = memoized_f(10)
y = memoized_f(11)
pipeline_b.py
from commons import memoized_f
x = memoized_f(20)
y = memoized_f(21)
- does python store one
memoized_fcache perpipeline_*module? so in the example above, there will be two caches, total formemoized_f? or - because the caching is defined for
memoized_f, there is only cache stored here formemoized_fin the application containing all the modules above?