Message276680
It would be useful to be able to clear a single item in the cache of a lru_cache decorated function.
Currently with:
@lru_cache
def foo(i):
return i*2
foo(1) # -> add 1 as key in the cache
foo(2) # -> add 2 as key in the cache
foo.clear_cache() # -> this clears the whole cache
foo.clear_cache(1) # -> this would clear the cache entry for 1 |
|
Date |
User |
Action |
Args |
2016-09-16 07:17:46 | Sébastien de Menten | set | recipients:
+ Sébastien de Menten |
2016-09-16 07:17:46 | Sébastien de Menten | set | messageid: <1474010266.85.0.645671097891.issue28178@psf.upfronthosting.co.za> |
2016-09-16 07:17:46 | Sébastien de Menten | link | issue28178 messages |
2016-09-16 07:17:46 | Sébastien de Menten | create | |
|