Cache API ​
HTTPX has no in-memory HTTP cache subsystem. HTTP caching is handled where it is actually implemented:
- Static files:
server.static(mount, dir)serves with ETags and honorsIf-None-Matchconditional requests (304 Not Modified). Embedded assets carry content-hash ETags. - Client downloads:
.existing = .verifyExistingskips re-downloads of files already on disk, and.replaceIfChangeduses conditional headers. - DNS: the client caches resolutions (
dnsCache: .{ .enable, .ttlMs, .negativeTtlMs, .maxEntries }inClientConfig).
See Static Files, Single File, and Client Basics.
