Spot the bug in the LRU cache

from lru_cache function caching
Python 3.14 beginner 4 min 1 issue to find

Find why the second call can return a stale price.

Python
from functools import lru_cache

catalog = {"paper": 5}

@lru_cache(maxsize=32)
def price(sku):
    return catalog[sku]

print(price("paper"))
catalog["paper"] = 6
print(price("paper"))
Open in playground
Report an error