Skip to content

Resolve "Implement caching functionality for RESTful API's"

Summary

Implement caching for RESTful API's

Explain your context

I have added the requests-cache package to our dependencies, refactored requests to use a session object, unique to each connector and then wrapped it via the beforementioned package's CachedSession object. A unique cache is initialized for each connector and saved on /eta_utility/connectors/.req_cache/

Please list breaking changes, new features or bugfixes

  • Breaking changes: requests are now made by a CachedSession object that wraps a requests.Session object with cache handling by the requests-cache package [internal]: error handling of requests has been outsourced to request's own error handling

  • New features: Forecast_Solar, entso_e and eneffco now support caching requests

  • Bugfixes:

Closes #242 (closed), #237 (closed)

Edited by Mikael Hailu

Merge request reports