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

Make `CachingSession` respect SAPI's `Cache-Control`/`max-age` (when released) #646

Closed randomir closed 1 month ago

randomir commented 1 month ago

In #645 we use a hard-coded default value for max-age (15 min), and validate cache via conditional requests after that.

That's because SAPI currently doesn't implement cache control, i.e. it returns none of the Cache-Control, Expires or Last-Modified header fields.

Implement support for Cache-Control response field, as that's the most modern and most robust cache control mechanism.