Can One Replace or Remove a specific key from functools.lru_cache?
This was requested via a python.org issue allow to cache_clear(some_key) in lru_cache and rejected. So there is no method in lru_cache
that clears a specific entry.
There is an excellent suggestion linked from that issue to implement your own variant using collections.OrderedDict
called Foundation for rolling your own LRU cache variants.