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 arequests.Session
object with cache handling by therequests-cache
package [internal]: error handling of requests has been outsourced to request's own error handling -
New features:
Forecast_Solar
,entso_e
andeneffco
now support caching requests -
Bugfixes:
Closes #242 (closed), #237 (closed)
Edited by Mikael Hailu