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

Fix RSS feeds not being cachable #14368

Merged
merged 2 commits into from
Jul 22, 2020
Merged

Conversation

ClearlyClaire
Copy link
Contributor

@ClearlyClaire ClearlyClaire commented Jul 20, 2020

We have a lot of responses that should be cachable but aren't.

Fundamentally, this mostly occurs because we're making use of sessions (and thus session cookies) when that is not strictly needed. Such occurrences are:

  • locale management: this may be reworked to not rely on sessions
  • recording the last visited page (so that we're sent back to it when logging in): not sure we can get rid of it
  • managing CSRF tokens: idk, but I don't think most public pages actually need it?

This PR adds tests to things that we have already made cachable, and fixes RSS feeds not being cachable.

Public HTML pages will require more work, if they're even possible to make cachable without loss of functionality.

This only covers responses that we should have managed to make cachable
so far. It's not the case of all responses that should be cachable in
the end.
@ClearlyClaire ClearlyClaire changed the title Fix some responses being uncachable Fix RSS feeds not being cachable Jul 20, 2020
@ClearlyClaire ClearlyClaire marked this pull request as ready for review July 20, 2020 17:44
@Gargron Gargron merged commit f55dd19 into mastodon:master Jul 22, 2020
shouo1987 pushed a commit to CrossGate-Pawoo/mastodon that referenced this pull request Dec 7, 2022
* Add tests for some cachable responses

This only covers responses that we should have managed to make cachable
so far. It's not the case of all responses that should be cachable in
the end.

* Fix RSS feeds not being cachable
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

Successfully merging this pull request may close these issues.

2 participants