Closed alexey-sveshnikov closed 2 years ago
Hi there, I've merged this in my fork of the repository at https://github.com/SkierPGP/flask-cache
@alexey-sveshnikov Hi Alex, could you elaborate more on this option? when the cache is hit, shall it returns first => then update at the background?
@tranlyvu, no I don't use this module anymore.
Hi!
I implemented 'forced_update' option which accepts callable. If callable returns true memoized or cached decorators ignores any cached value regardless if it valid or not.
This option may be used to update cache for slow memoized functions in background jobs. At project that I maintain it helped me to resolve annoying problem of strong spikes of server load when cache for some heavy function expires and multiple web workers starts to calculate its value.