importcacherimporttime@cacher.lru_cache# Cache with 128 valuesdefexpensive_function(x):
print("processing function a")
time.sleep(1)
returnx*x@cacher.lru_cache(1024) # Cache with 1024 valuesdefexpensive_function_b(x):
print("processing function b")
time.sleep(1)
returnx*xdefexpensive_function_c(x):
print("processing function c")
time.sleep(1)
returnx*xlrued_function=cacher.lru_cache(expensive_function_c)
lrued_function(x=2) # keyword arguments support