bryancall opened a new pull request, #12782:
URL: https://github.com/apache/trafficserver/pull/12782
Add configuration option `proxy.config.http.cache.defer_write_on_miss` to
defer opening the cache for write until after response headers are received and
evaluated for cacheability.
## Performance Impact
When enabled, this optimization:
- Avoids unnecessary cache overhead for non-cacheable responses
- Can improve throughput ~21x for non-cacheable content (e.g.,
`Cache-Control: no-store` responses)
## Trade-offs
When enabled:
- May affect read-while-write functionality
- May reduce request coalescing for popular uncached URLs
- Recommended only for traffic patterns with mostly unique URLs or
predominantly non-cacheable content
## Configuration
```yaml
proxy:
config:
http:
cache:
defer_write_on_miss: 1 # 0=disabled, 1=enabled
```
## How it works
1. On cache miss, set `cache_open_write_deferred=true` instead of
immediately opening cache for write
2. Go to origin and fetch response headers
3. Check if response is cacheable:
- If not cacheable (no-store, etc.): skip cache write entirely
- If cacheable: open cache for write and proceed normally
**Note:** Default is currently enabled for CI testing. Will be changed to
disabled before merge.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]