문제

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

  • unless – Default None. Cache will always execute the caching
    facilities unless this callable is true. This will bypass the caching entirely.

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

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top