Skip to content

feat(dependency-proxy): Endpoint for org and instanceAdmin for cache stats - #3171

Open
juliankepka wants to merge 4 commits into
mainfrom
feat/stats-cache-dependency-proxy
Open

juliankepka wants to merge 4 commits into
mainfrom
feat/stats-cache-dependency-proxy

Conversation

@juliankepka

Copy link
Copy Markdown
Collaborator

Each organization gets its own subdirectory, named after its org ID, which prevents cache poisoning across organizations.

DEPENDENCY_PROXY_CACHE_MAX_SIZE_MB now applies per organization. On startup, leftover files from the old flat cache layout are removed, and each org directory is cleared the first time it is used after a restart, so the in-memory index and the disk stay consistent.

The cache now tracks size, number of entries, hits, misses and evictions, exposed through
GET /organizations/{organization}/dependency-proxy/cache-stats/ for org admins and
GET /admin/statistics/dependency-proxy-cache/ for instance admins (aggregated across all organizations).

This PR depends on the PR #3162 that removes the unauthenticated proxy routes: requests without a secret have no organization and currently return 500.

Copilot AI balanced review requested due to automatic review settings October 7, 2026 09:17

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.

This branch has not been deployed

No deployments
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.

Endpoint for cache stats (storage consumption etc)

2 participants