Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"forced_update" option to 'cache' and 'memoize' decorators #123

Open
wants to merge 1 commit into
base: master
from

Conversation

@alexey-sveshnikov
Copy link

commented Aug 3, 2015

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.

@Fuyukai

This comment has been minimized.

Copy link

commented Aug 23, 2015

Hi there, I've merged this in my fork of the repository at https://github.com/SkierPGP/flask-cache

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.