Use cached metadata for npm metadata endpoint at the project level
🌱 Context
At this point we should be ready to start returning a cached metadata at the project level endpoint.
last_downloaded_at field of Packages::Npm::MetadataCache will help with an observation of usage of cached metadata and will be a criteria to cleanup old caches.
⚒️ Proposal
- Separate the instance and project level metadata endpoints.
- Use
Packages::Npm::MetadataCachewith a fallback to "on the fly" generation for the project level endpoint. - Touch
last_downloaded_atfield ofPackages::Npm::MetadataCachewhen cached metadata is returned.
Important
Hide behind a feature flag
Edited by Dzmitry (Dima) Meshcharakou