finos / metadata-tool

A command line tool for performing various tasks with Fintech Open Source Foundation (FINOS) metadata.
Apache License 2.0
12 stars 5 forks source link

Fix HTTP caching behavior #35

Closed skuro closed 5 years ago

skuro commented 5 years ago

In order to leverage HTTP caching, the very same HTTP client instance must be reused across calls. This PR uses a memoized client function to only ever create a client once and then return the same instance over and over (which seems the original intent of the code).

Previous behavior is preserved through the base client* function. Docstrings are provided to properly distinguish between the two flavors.

maoo commented 5 years ago

Thanks for this PR @skuro , looks good to me. Allow me some time to test it before merging, I'll keep you posted.