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

Update in bulk #7

Open
thenewguy opened this issue Jun 21, 2018 · 1 comment
Open

Update in bulk #7

thenewguy opened this issue Jun 21, 2018 · 1 comment

Comments

@thenewguy
Copy link

I have a situation where I am caching records from remote API get requests. I would like to run a background task that fetches a list in bulk and primes the cache in bulk.

It would be useful if there was a helper for this like ".invalidate"

Perhaps cache_memoized_function.set(args, result)? And potentially cache_memoized_function.set_in_bulk([(args1, result1), (args2, result2), ..., (argsN, resultN)])

Right now to do this I need to hit the list api and then parse the results and rerun the memoized function. So I have to fetch the records twice in this case

@thenewguy
Copy link
Author

thenewguy commented Jun 23, 2018

I am happy to write the function and tests in a pr if the set function would be accepted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant