Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expiring with response headers #9

Open
sckott opened this issue Mar 27, 2020 · 1 comment
Open

expiring with response headers #9

sckott opened this issue Mar 27, 2020 · 1 comment
Labels
expire request expiration related issues

Comments

@sckott
Copy link
Owner

sckott commented Mar 27, 2020

right now the only method we have is time based: number of seconds since the request was recorded.

perhaps we can use response headers, following https://github.com/sourcelevel/faraday-http-cache :

p.s.

Seems that the folowing are often found together:

  • cache-control and age
  • last-modified, if-modified-since, if-unmodified-since
  • etag

@sckott sckott added the expire request expiration related issues label Mar 27, 2020
@sckott
Copy link
Owner Author

sckott commented Mar 27, 2020

APIs that send certain response headers to test against:

  • cache-control/age:
    • GBIF API, eg., cache-control: public, max-age=3601 & age: 0/age: 478 (age header varies with each request)
    • CORE API, e.g., Cache-Control: no-cache
    • Wikimedia API, e.g., w/ wikitaxa::wk_wikispecies, e..g, cache-control: private, must-revalidate, max-age=0 & age: 0 (age field is always zero w/ each request)
    • BHL API, e.g., Cache-Control: private & ``
  • cache-control/expires/pragma:
    • ORCID API, e.g., Cache-Control: no-cache, no-store, max-age=0, must-revalidate & Expires: 0 & Pragma: no-cache
  • etag:
    • IUCN Redlist API, e.g., ETag: W/"3eb-ZLtsaPeDQHcASdzjqCxnUQ"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
expire request expiration related issues
Projects
None yet
Development

No branches or pull requests

1 participant