Green-Software-Foundation/carbon-aware-sdk

[Feature Contribution]: Data caching in the SDK

Closed this issue · 2 comments

What happened?

I'd like to propose data caching in Carbon Aware SDK.

Currently the SDK inquires to data source (Electricity Maps, Electricity appsFree, WattTime) when it receives request in each time. However data source might have call limit. For example, ElectricityMaps for Japan has limit in 500,000 calls in a month. If we use the SDK in high load, we might reach this limit in early stage.

https://api-portal.electricitymaps.com/catalog/prd_7ltqojro8wscnhva

So I believe it is helpful the SDK can hold data in its cache. Some configuration (e.g. cache interval) should be configurable of course.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Feature Commitment

  • I commit to contributing this feature as a PR and working with the GSF to merge this feature into the Carbon Aware SDK.

This issue has not had any activity in 120 days. Please review this issue and ensure it is still relevant. If no more activity is detected on this issue for the next 20 days, it will be closed automatically.

I close this issue because #421 has been merged.

It has been merged into topic branch (vnext/dotnet8-upgrade), but I believe the branch will be merged ASAP when next version is released (v1.3).