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

Add HTTP cache headers to release APIs #17

Open
preaction opened this issue Nov 16, 2017 · 0 comments
Open

Add HTTP cache headers to release APIs #17

preaction opened this issue Nov 16, 2017 · 0 comments

Comments

@preaction
Copy link
Member

We should be able to improve our users' experience with this API by adding appropriate HTTP caching headers to this API:

  • Add an accurate Last-Modified time to the release API
    • This time should be the last updated time of the last report that was made part of this data
    • This can be found by joining the report table via the release data's guid column. See CPAN::Testers::Schema::ResultSet::Release->since for an example.
  • Respond to If-Modified-Since request header
    • Check the last modified time we would send out. If the If-Modified-Since header is greater than the Last-Modified time, send back 304 Not Modified instead of the data
  • Add Cache-control headers to the response
    • This data only updates every 60 minutes, so tell users they can cache it for 60 minutes (max-age=3600)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant