-
-
Notifications
You must be signed in to change notification settings - Fork 190
Open
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
It would be nice to have an optional parameter such as filter in the @cache decorator that took as input a python callable w/ the wrapped function's *args and **kwargs and returned a boolean as to whether or not to cache.
The default could just be always true e.g. lambda x: True but users may want more nuanced control, based on the parameters to the function itself. In my particular case, I can't quite use cache-control header because i want to determine whether or not to cache on the server side based on query params.
If I get some time, I can jam on this and submit a PR, if you think it could be worthwhile?
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request