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

feat: add build cache settings #1669

Merged
merged 20 commits into from
May 29, 2023
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[[headers]]
for = "/*"
[headers.values]
Cache-Control = "public, max-age=3600"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the scope of the issue is to enable cache for build,

why is this header added? what will it change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is added to control how caching should be performed
The value public, max-age=3600 specifies that the response can be cached by both public and private caches
,and the caching age is 3600 seconds

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes but how is it helping with cache build? this is a setting for the server and client side caching. So imho totally unrelated and probably something we should not add

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well it just tell the server how long the response should be considered fresh and cacheable.So we can remove it as it doesn't help us that much in build

X-Frame-Options = "ALLOW-FROM https://www.youtube.com/"
Access-Control-Allow-Origin = "*"

Expand All @@ -10,6 +11,7 @@
publish = "out"

[build.environment]
NETLIFY_NEXT_PLUGIN_SKIP = "true"
derberg marked this conversation as resolved.
Show resolved Hide resolved
derberg marked this conversation as resolved.
Show resolved Hide resolved
NODE_VERSION = "16.13.2"
NPM_VERSION = "8.1.2"

Expand All @@ -32,3 +34,6 @@ path = "/definitions/*"
[[edge_functions]]
function = "serve-definitions"
path = "/schema-store/*"

[[plugins]]
package = "@netlify/plugin-nextjs"
sambhavgupta0705 marked this conversation as resolved.
Show resolved Hide resolved
Loading