Skip to content

proxy: preserve zero TTL in respectTTLOverrides#491

Open
hengwu0 wants to merge 1 commit intoAdguardTeam:masterfrom
hengwu0:master
Open

proxy: preserve zero TTL in respectTTLOverrides#491
hengwu0 wants to merge 1 commit intoAdguardTeam:masterfrom
hengwu0:master

Conversation

@hengwu0
Copy link
Copy Markdown

@hengwu0 hengwu0 commented Mar 26, 2026

TTL=0 means the response must not be cached and should only be used for the current transaction.

Before this change, respectTTLOverrides() promoted TTL=0 to cacheMinTTL, which could turn a non-cacheable response into a cacheable one.

Skip the minimum TTL override when ttl is zero so zero-TTL responses preserve their original semantics.

TTL=0 means the response must not be cached and should only be used
for the current transaction.

Before this change, respectTTLOverrides() promoted TTL=0 to
cacheMinTTL, which could turn a non-cacheable response into a
cacheable one.

Skip the minimum TTL override when ttl is zero so zero-TTL responses
preserve their original semantics.

Signed-off-by: hengwu0 <17380582683@163.com>
@hengwu0
Copy link
Copy Markdown
Author

hengwu0 commented Mar 26, 2026

fixed #490

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.

1 participant