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

Check ETag on 200 response when checking if configuration setting has changed #588

Open
amerjusupovic opened this issue Aug 16, 2024 · 2 comments

Comments

@amerjusupovic
Copy link
Member

Currently, if the provider makes a request to get configuration settings using the If-None-Match header, it considers any response with a status code of 200 to mean that the queried settings have changed in the App Configuration store. However, HTTP caching rules state that if a request gets 304 but the cache has a corresponding value, it will return a 200 status code instead. This means that we would be unnecessarily refreshing the configuration in that case, which could be prevented by always checking the ETag to see if anything has changed instead of only the status code.

@Eskibear
Copy link
Member

It makes sense for sentinel-based key-values refresh as we cache etags for sentinels. Just curious what would be the case for page etags? I don't think we cache page etags for each page for each selector, that would be too much. Or we just skip the optimization in this case?

@amerjusupovic
Copy link
Member Author

amerjusupovic commented Aug 20, 2024

We don't cache the page etags at the moment, but in order to offer the functionality we want in #536 we would have to do so if someone were to call the RegisterAll API, like I added in #574. If they don't call that API, I don't think the optimization is reasonable outside of sentinel refresh, like you said.

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

No branches or pull requests

2 participants