Hi Esteban,
On 4 Dec 2019, at 21:35, Esteban Maringolo <emaringolo@gmail.com> wrote:
Is there any library/setting that adds "cache" to ZnClient?
I'm doing some web scrapping with ZnClient, and sometimes I request the same pages (~300) more than once, and I'd like to save requests (and time) by simply retrieving what's in the cache (since the content doesn't change frequently).
Maybe there other way is to put an HTTP proxy in between and ask the local proxy.
Regards,
Esteban A. Maringolo
No, this does not exist as such, not in public code anyway, AFAIK. In our codebase there is a RestJsonClient which holds onto an httpClient and a CachingRestJsonClient as a subclass of that one, that add a cache url->json with time and number of entries based lru invalidation. It would not be too hard to built this yourself. Sven