Skip to content

Commit

Permalink
Merge pull request #10 from Kikobeats/next
Browse files Browse the repository at this point in the history
feat: add must-revalidate directive
  • Loading branch information
Kikobeats committed Mar 12, 2019
2 parents 51e5901 + 0ca286f commit 29c8002
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -258,6 +258,7 @@ You can have a better overview of the percentage of success by looking your Clou
- [Server rendered pages are not optional, by Guillermo Rauch](https://rauchg.com/2014/7-principles-of-rich-web-applications#server-rendered-pages-are-not-optional).
- [Increasing the Performance of Dynamic Next.JS Websites, by scale AI](https://scale.ai/blog/performance-on-next-js-websites).
- [The Benefits of Microcaching, by NGINX](https://www.nginx.com/blog/benefits-of-microcaching-nginx/).
- [Cache-Control for Civilians, by Harry Robert](https://csswizardry.com/2019/03/cache-control-for-civilians/)

## License

Expand Down
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -30,7 +30,7 @@ const createSetHeaders = ({ revalidate }) => {

res.setHeader(
'Cache-Control',
`public, max-age=${maxAge}, s-maxage=${maxAge}, stale-while-revalidate=${
`public, must-revalidate, max-age=${maxAge}, s-maxage=${maxAge}, stale-while-revalidate=${
hasForce ? 0 : toSeconds(revalidate(ttl))
}`
)
Expand Down

0 comments on commit 29c8002

Please sign in to comment.