Given the following simple example:
@cachetools.cached(cachetools.Cache(maxsize=100))
def foo(a=1):
print(a)
This is the result of calling foo(), foo(1) and foo(a=1):
>>> foo()
1
>>> foo()
>>> foo(1)
1
>>> foo(1)
>>> foo(a=1)
1
>>> foo(a=1)
One would expect that foo would only be executed once instead of 3 times:
>>> foo()
1
>>> foo()
>>> foo(1)
>>> foo(1)
>>> foo(a=1)
>>> foo(a=1)