Skip to content

Properly make use of Cache-Control: private#1075

Merged
jviotti merged 2 commits into
mainfrom
cache-control-private
Jun 19, 2026
Merged

Properly make use of Cache-Control: private#1075
jviotti merged 2 commits into
mainfrom
cache-control-private

Conversation

@jviotti

@jviotti jviotti commented Jun 19, 2026

Copy link
Copy Markdown
Member

Signed-off-by: Juan Cruz Viotti jv@jviotti.com

Review in cubic

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

1 issue found across 13 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/router/artifact.cc
@augmentcode

augmentcode Bot commented Jun 19, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR updates registry responses to correctly use Cache-Control: private when content is only accessible via credentials, preventing shared caches from storing protected artifacts.

Changes:

  • Propagates a new is_public flag from artifact resolution to indicate whether a path is reachable anonymously.
  • Centralizes cache-control selection via RouterAction::content_cache_control() and applies it across multiple registry-serving actions.
  • Adjusts enterprise E2E (hurl) expectations so authenticated/private endpoints assert Cache-Control: private, max-age=0, must-revalidate.

Technical Notes: Public endpoints remain explicitly cacheable (public, max-age=0, must-revalidate) even when a credential is supplied, while credential-only endpoints become private.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread src/router/include/sourcemeta/one/router.h
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>

@github-actions github-actions Bot 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.

Benchmark Index (community)

Details
Benchmark suite Current: 87444b2 Previous: 96d1822 Ratio
Add one schema (0 existing) 399 ms 402 ms 0.99
Add one schema (100 existing) 28 ms 30 ms 0.93
Add one schema (1000 existing) 82 ms 86 ms 0.95
Add one schema (10000 existing) 641 ms 692 ms 0.93
Update one schema (1 existing) 21 ms 22 ms 0.95
Update one schema (101 existing) 28 ms 32 ms 0.88
Update one schema (1001 existing) 81 ms 91 ms 0.89
Update one schema (10001 existing) 660 ms 694 ms 0.95
Cached rebuild (1 existing) 6 ms 6 ms 1
Cached rebuild (101 existing) 8 ms 9 ms 0.89
Cached rebuild (1001 existing) 27 ms 30 ms 0.90
Cached rebuild (10001 existing) 243 ms 255 ms 0.95
Index 100 schemas 504 ms 691 ms 0.73
Index 1000 schemas 1617 ms 1572 ms 1.03
Index 10000 schemas 13452 ms 13746 ms 0.98
Index 10000 schemas (custom meta-schema) 16438 ms 16619 ms 0.99
Index 10000 schemas ($ref fan-out) 16427 ms 16959 ms 0.97

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions github-actions Bot 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.

Benchmark Index (enterprise)

Details
Benchmark suite Current: 87444b2 Previous: 96d1822 Ratio
Add one schema (0 existing) 376 ms 375 ms 1.00
Add one schema (100 existing) 32 ms 35 ms 0.91
Add one schema (1000 existing) 86 ms 86 ms 1
Add one schema (10000 existing) 683 ms 666 ms 1.03
Update one schema (1 existing) 24 ms 24 ms 1
Update one schema (101 existing) 31 ms 31 ms 1
Update one schema (1001 existing) 87 ms 87 ms 1
Update one schema (10001 existing) 696 ms 679 ms 1.03
Cached rebuild (1 existing) 8 ms 8 ms 1
Cached rebuild (101 existing) 10 ms 10 ms 1
Cached rebuild (1001 existing) 34 ms 33 ms 1.03
Cached rebuild (10001 existing) 278 ms 276 ms 1.01
Index 100 schemas 471 ms 616 ms 0.76
Index 1000 schemas 1519 ms 1418 ms 1.07
Index 10000 schemas 13749 ms 13243 ms 1.04
Index 10000 schemas (custom meta-schema) 16271 ms 15837 ms 1.03
Index 10000 schemas ($ref fan-out) 16173 ms 16306 ms 0.99

This comment was automatically generated by workflow using github-action-benchmark.

@jviotti jviotti merged commit cd7adae into main Jun 19, 2026
5 checks passed
@jviotti jviotti deleted the cache-control-private branch June 19, 2026 21:21
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