Closed ahwagner closed 5 years ago
Needs more docstrings.
I've cleaned up the PR a bit. Commit 3d33f71 drops some unnecessary routines, renames others, and adds docstrings!
Ready (again) for your review, @susannasiebert. Merge to version
if you think it looks good.
This PR started with a very minor addition, to add a get_all_evidence() function.
Then I went to add a unit test for it, and things got crazy. I realized that you could have either a local cache that gets stale after 7 days, OR load a remote cache on each session. However, the ideal solution is maintaining a local cache that is refreshed from the precomputed remote cache once stale. ebd3875 addresses this with an extended
update_cache
routine. Theupcate_cache
behavior is configurable through the use of thefrom_remote_cache
flag (if set to False, it will do the normal CIViCpy queries and compute the cache).Let me know what you think.