cachier icon indicating copy to clipboard operation
cachier copied to clipboard

Clearing cache based on method parameters

Open quoimec opened this issue 4 years ago • 2 comments

The ability to cache a method based on the function parameters to that method is extremely useful. However, at the moment, if I need to invalidate the cache for a specific set of arguments, I have to clear the entire cache for that method.

Are there any future plans for allowing individual sections of the cache to be cleared based on method parameters?

quoimec avatar May 07 '21 01:05 quoimec

No current plans, but it should be a simple addition. It just requires adding optional parameters to the clear_cache function and have it clear param-specific entries if these are provided. It's just a matter of someone stepping up and providing a code contribution implementing this feature. :)

I'd love for you to open a PR, if you think you can spare the time!

shaypal5 avatar May 09 '21 09:05 shaypal5

Hmm ok! I may have a look at this in the next week or two as it would be really useful for my use case.

Thanks for the reply and the package!

quoimec avatar May 10 '21 00:05 quoimec