AdguardTeam / AdguardTeam/AdGuardHome
TTL=0 responses are cached and rewritten to cache_ttl_min
- Lenguaje dominante
- TypeScript
- Estrellas
- 36.9k
- Forks
- 2.5k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
### Prerequisites
- [x] I have checked the [Wiki](https://github.com/AdguardTeam/AdGuardHome/wiki) and [Discussions](https://github.com/AdguardTeam/AdGuardHome/discussions/categories/q-a) and found no answer
- [x] I have searched other issues and found no duplicates
- [x] I want to report a bug and not [ask a question or ask for help](https://github.com/AdguardTeam/AdGuardHome/discussions/categories/q-a)
- [x] I have set up AdGuard Home correctly and [configured clients to use it](https://github.com/AdguardTeam/AdGuardHome/wiki/Clients). (Use the [Discussions](https://github.com/AdguardTeam/AdGuardHome/discussions/categories/q-a) for help with installing and configuring clients.)
### Platform (OS and CPU architecture)
Darwin (aka macOS), AMD64 (aka x86_64)
### Installation
GitHub releases or script from README
### Setup
On one machine
### AdGuard Home version
v0.107.73
### Action
According to RFC 1035, resource records with TTL=0 must not be cached. They may only be used for the current transaction.
However, in my setup AdGuard Home appears to cache upstream responses with TTL=0 and then rewrites the returned TTL to `cache_ttl_min`. This seems incorrect for two reasons:
1. TTL=0 responses should not be cached.
2. Rewriting TTL=0 to `cache_ttl_min` changes the caching semantics defined by RFC 1035.
### Expected result
+ A response with TTL=0 should not be inserted into cache.
+ cache_ttl_min should not be applied to TTL=0 responses, unless this behavior is explicitly documented as an intentional standards deviation.
### Actual result
+ Repeated queries appear to be served from cache.
+ The returned TTL is rewritten to the configured cache_ttl_min instead of remaining non-cacheable.
### Additional information and/or screenshots
+ RFC 1035 says TTL=0 records "should not be cached".
+ Current dnsproxy cache logic also appears to treat computed TTL=0 as non-cacheable.
+ If this behavior is intentional, the documentation for cache_ttl_min should explicitly mention that TTL=0 is overridden and cached despite RFC semantics.
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.