Skip to content

Resolve "Locate caches for requests elsewhere"

Summary

Currently cache files for requests such as 'forecast_solar_cache.sqlite' are created in the root directory of any project that imports eta_utility.

Any cache in this context however should not be directly visible to eta_utility users, therefore a different location shall be configured

Explain your context

As of now when importing eta_utility in an arbitrary environment and triggering a CachedSession.request e.g. by calling a connector's read() function, a new file is created at <eta_utility/connectors/.requests_cache/>.

Setting the 'use_cache_dir` attribute of a CachedSession to true creates the corresponding files in the user's cache directory (hopefully).

Please list breaking changes, new features or bugfixes

  • Breaking changes:
  1. Cache read/write now at User's home directory
  2. Removed gitignore directive

Closes #298 (closed)

Edited by Mikael Hailu

Merge request reports