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

Add support for s-maxage #266

Merged
merged 4 commits into from
Mar 25, 2019
Merged

Add support for s-maxage #266

merged 4 commits into from
Mar 25, 2019

Conversation

johanjanssens
Copy link
Member

@johanjanssens johanjanssens commented Mar 23, 2019

This PR adds an optional additional shared_max_age parameter to the KHttpResponse::setMaxAge() method. If the shared max age value is larger then the max age value it will be set in the cache control s-maxage directive.

The KHttpResponse::getMaxAge() method now returns the s-maxage if it's defined and falls back to the max-age, or 0 if no max age is defined.

A new cache_time_shared config option has been added to KDispatcherBehaviorCacheable to allow setting the s-maxage cache control directive.

Add an optional additional shared_max_age parameter to the setMaxAge()
method. Only set the s-maxage if it's larger then the max-age value.

Make getMaxAge() method return s-maxage if it's defined and fallback
to the max-age, or 0 if no max age is defined
The cache_time_shared setting defines the s-maxage cache control
directive. If cache_time_shared > cache_time the s-maxage directive
will be added to the response to instruct proxies to cache the
response longer.
@ercanozkaya ercanozkaya merged commit 9d6f468 into master Mar 25, 2019
@ercanozkaya ercanozkaya deleted the feature/265-smaxage branch March 25, 2019 09:30
@johanjanssens johanjanssens mentioned this pull request Mar 27, 2019
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants