dwavesystems / dwave-cloud-client

A minimal implementation of the REST interface used to communicate with D-Wave Solver API (SAPI) servers.
https://docs.ocean.dwavesys.com/projects/cloud-client/en/stable/
Apache License 2.0
59 stars 40 forks source link

Implement response cache control #650

Closed randomir closed 1 month ago

randomir commented 1 month ago

Close #646.

Until Cache-Control header is added to SAPI responses, we cache heuristically** for 1 hour.

** since we can't actually determine heuristic freshness as neither Last-Modified or Expires are present in SAPI responses, we default to a reasonable period for solver metadata.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 92.30769% with 3 lines in your changes missing coverage. Please review.

Project coverage is 88.74%. Comparing base (8712320) to head (35fe0ac).

Files Patch % Lines
dwave/cloud/api/client.py 92.30% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #650 +/- ## ========================================== + Coverage 88.71% 88.74% +0.03% ========================================== Files 42 42 Lines 4722 4745 +23 ========================================== + Hits 4189 4211 +22 - Misses 533 534 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.