Skip to content

Logging: add cache freshness fields#13417

Open
bneradt wants to merge 1 commit into
apache:masterfrom
bneradt:cache-freshness-age-logging
Open

Logging: add cache freshness fields#13417
bneradt wants to merge 1 commit into
apache:masterfrom
bneradt:cache-freshness-age-logging

Conversation

@bneradt

@bneradt bneradt commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Cache modeling cannot currently observe an object’s effective
freshness limit or its age when ATS serves it, leaving access logs
unable to describe cache lifetime and churn.

This adds cfl and cca log fields and records their values when ATS
prepares cache metadata or serves a cached response. It resets the
values for each lookup and adds replay coverage for writes, hits, and
non-cacheable responses.

Fixes: #13127

Co-authored-by: sheikh-saifi p240592@pwr.nu.edu.pk

Copilot AI review requested due to automatic review settings July 21, 2026 20:12
@bneradt bneradt added this to the 11.0.0 milestone Jul 21, 2026
@bneradt bneradt self-assigned this Jul 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Cache modeling cannot currently observe an object’s effective
freshness limit or its age when ATS serves it, leaving access logs
unable to describe cache lifetime and churn.

This adds cfl and cca log fields and records their values when ATS
prepares cache metadata or serves a cached response. It resets the
values for each lookup and adds replay coverage for writes, hits, and
non-cacheable responses.

Fixes: apache#13127

Co-authored-by: sheikh-saifi <p240592@pwr.nu.edu.pk>
Copilot AI review requested due to automatic review settings July 21, 2026 20:23
@bneradt
bneradt force-pushed the cache-freshness-age-logging branch from ab8b85a to fed4605 Compare July 21, 2026 20:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@sheikh-saifi

sheikh-saifi commented Jul 21, 2026

Copy link
Copy Markdown

Thanks for fixing this! the reset in DecideCacheLookup and splitting the write vs hit call sites was exactly what my version was missing. Went through the code and the three test cases (write/hit/uncacheable) and it all makes sense.
Sorry for disappearing after the first review, got pulled into other stuff and should've followed up. Happy to help test or review anything else on this.

@bneradt

bneradt commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for fixing this! the reset in DecideCacheLookup and splitting the write vs hit call sites was exactly what my version was missing. Went through the code and the three test cases (write/hit/uncacheable) and it all makes sense. Sorry for disappearing after the first review, got pulled into other stuff and should've followed up. Happy to help test or review anything else on this.

Sounds good. Thanks for the comments. I definitely plan to attribute your work with the commit, in addition to the PR here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ability to log "freshness_limit" and "current_age"

3 participants