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

Added stale-if-error and fixed bug for frontend cache staleWhileRevaidate config (#21886) #21887

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JamesMarino
Copy link

This PR fixes the staleWhileRevaidate config not being passed into the cacheControl() middleware if it is set via the frontend caching config. It also adds the staleIfError configuration to allow the stale-if-error Cache-Control header directive.

Tests have also been added for varying cases of the directives including when the Ghost config is not set.

Documentation from https://ghost.org/docs/config/#caching will also need to be updated. Happy to update this given the source.

  • There's a clear use-case for this code change, explained above
  • Commit message has a short title & references relevant issues
  • The build will pass (run yarn test and yarn lint)

Closes issue #21886

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.

1 participant