django-cache-memoize
django-cache-memoize copied to clipboard
Update in bulk
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
I am happy to write the function and tests in a pr if the set
function would be accepted