-
Notifications
You must be signed in to change notification settings - Fork 97
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
ability to specify cache-control header in config #124
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to have this value out-of-sync with
config.assets.sweep_cache
?Wouldn't be easier to keep it in sync by default like
❓
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep
sweep_cache
makes more sense 👍, I will change it later this week 😇There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@simi on second thought this may be a bad idea
by relying on value of
config.assets.sweep_cache
we may end up overiding the valueconfig.assets.cache_control_header
if user wants to set it himself/herself:Example:
...now what ?? Should the
cache_control_header
beno-store
orwhatever
?I would say the original PR is least prone to edgecases = let the developer decide what value to return as
cache_control_header
Please watch full explanation on loom:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clear, this could be fixed by setting original value of
sweep_cache
tonil
by default and only when it is not assigned tofalse
explicitly, changecache_control_header
and also self assign tofalse
. Anything in here works for me. Even two independent config options as originally proposed. With sane default values per environment it would be rarely tweaked by users anyway.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@simi Sorry I'm getting back after 2 weeks (I had some personal issues to solve)
Thank you for the recommendation how to fix this with
nil
sweep_cache
. I understandUnless you really want the sweep_cache nil solution (as you proposed) I would vote for the original "two independent config options" solution. I get it no-one will really change the values. But personally purely to have simple straight forward config.
please let me know if I should do the
nil
change proposed or notThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned no huge preference from my side. Let's grab some maintainers attention somehow, they can decide on their own. 🙏
@brenogazzola @dhh friendly ping