Sign in or sign up before continuing. Don't have an account yet? Register now to get started.
Register now
Implement Remote Cache Entries API
## Summary Implement `API::VirtualRegistries::Packages::Npm::Cache::Remote::Entries` for listing and deleting remote cache entries in the NPM virtual registry. ## Background This API allows users to view and manage cached responses from remote upstream registries. Cache entries are created when packages are fetched from upstreams and can be deleted to force re-fetching. ## Reference Use the Maven implementation as a reference: - `ee/lib/api/virtual_registries/packages/maven/cache/entries.rb` ## Location `ee/lib/api/virtual_registries/packages/npm/cache/remote/entries.rb` ## Endpoints | Method | Route | Description | |--------|-------|-------------| | GET | `/virtual_registries/packages/npm/remote/upstreams/:id/cache_entries` | List all remote cache entries for upstream | | DELETE | `/virtual_registries/packages/npm/remote/cache_entries/*id` | Delete a remote cache entry | ## Notes - List endpoint supports pagination and search by relative path - Delete endpoint uses base64-encoded ID (upstream_id + relative_path) - Deletion marks entry as `pending_destruction` rather than immediate delete ## Permissions - `read_virtual_registry` - for GET endpoint - `destroy_virtual_registry` - for DELETE endpoint ## :warning: Feature flag Please use the ~"feature flag" `npm_virtual_registry` with a group as an actor for API endpoints.
task