pythonflaskflask-cache

Can we specify parameters for unless function in cached function(in Flask-Cache)


From Flask-Cache Documentation, cached function takes following parameters - timeout,key_prefix, unless. Unless is descibed as

Is there a way to pass parameters to unless function, by which we can dynamically know whether to apply the caching or not.


Solution

  • Looking at the code as it currently stands this is not possible. Definitely worth a pull request.