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

Figure out cache-control for our REST API endpoints #1084

Closed
humphd opened this issue Apr 27, 2020 · 1 comment
Closed

Figure out cache-control for our REST API endpoints #1084

humphd opened this issue Apr 27, 2020 · 1 comment
Labels
area: web server Issues related to the web server type: enhancement New feature or request

Comments

@humphd
Copy link
Contributor

humphd commented Apr 27, 2020

According to webhint, we aren't setting proper cache-control headers for our REST API endpoints. This means that users' browsers aren't able to cache these responses effectively.

Here are the endpoints we have, and some notes on each:

  • /admin - areas only available to admin users. Not critical for efficiency
  • /auth our login/logout routes. I can't imagine we'd want to cache these
  • /feed various feeds we offer of our content. These could probably be cached for an hour
  • /feeds various methods for working with one or more feeds. These could be cached for minutes to an hour?
  • /health healthcheck, and version info. Probably could be cached 0 to a few minutes?
  • /planet the old planet we have hidden in our app, could be cached for minutes to an hour?
  • /query I don't think this should get cached
  • /posts this is probably one of the heaviest accessed routes, worth thinking about this carefully. A post can probably be cached for an hour or less. The list of posts could be cached too, not sure how long.
  • /sp our metadata for SSO. This can get cached for a long time
  • /stats could get cached for an hour or less?
  • /user/info is the data for a logged in user, so we don't want to cache this I don't think. Probably the same with /user/feeds
@humphd humphd added type: enhancement New feature or request area: web server Issues related to the web server labels Apr 27, 2020
@humphd
Copy link
Contributor Author

humphd commented Mar 18, 2021

Closing in favour of #1936.

@humphd humphd closed this as completed Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: web server Issues related to the web server type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant