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

fix: Include expires header on 304 cache hit #438

Merged
merged 1 commit into from
Sep 6, 2024
Merged

Conversation

keelerm84
Copy link
Member

When configured with a TTL, the relay proxy will include an expires header when a flag or segment is first requested. This informs the PHP SDK how long it can cache the response.

Once the SDK makes another request, it is possible the flag still hasn't changed. In that situation, we should return a new expires header. Otherwise, the PHP SDK will have no idea how long it should cache this new response for, resulting in it re-fetching on demand going forward.

When configured with a TTL, the relay proxy will include an `expires`
header when a flag or segment is first requested. This informs the PHP
SDK how long it can cache the response.

Once the SDK makes another request, it is possible the flag still hasn't
changed. In that situation, we should return a new `expires` header.
Otherwise, the PHP SDK will have no idea how long it should cache this
new response for, resulting in it re-fetching on demand going forward.
@keelerm84 keelerm84 requested a review from a team as a code owner September 6, 2024 01:05
@keelerm84 keelerm84 merged commit b24370e into v8 Sep 6, 2024
8 checks passed
@keelerm84 keelerm84 deleted the mk/sc-255328/304 branch September 6, 2024 02:10
@github-actions github-actions bot mentioned this pull request Sep 6, 2024
keelerm84 pushed a commit that referenced this pull request Sep 6, 2024
🤖 I have created a release *beep* *boop*
---


##
[8.9.4](v8.9.3...v8.9.4)
(2024-09-06)


### Bug Fixes

* Include expires header on 304 cache hit
([#438](#438))
([b24370e](b24370e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

2 participants