Jul-29-2023, 04:52 AM
I think creating your own is the way to go here. lru_cache doesn't have any method to invalidate individual entries. Even if it did, you'd already have to have to stat the file and manage the logic to detect when to invalidate them.