Join GitHub today
"forced_update" option to 'cache' and 'memoize' decorators #123
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.