-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QUESTION] Get info by integrity? #166
Labels
Comments
The reason the metadata is not included is because multiple entries can have the same digest. For instance if they are at different urls. There is no current way to correlate the data back to the individual items. That was not an original design concern of npm, once we have a digest we just want the data. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there an existing issue for this?
Current Behavior
I was wondering if it's possible to get info for a cache entry by digest? Something like
cacache.get.info.byDigest(cache, integrity)
cacache.get.info(cache, key)
only takes akey
andget.info.byDigest
doesn't exist. I seecacache.get.hasContent(cache, integrity)
which finds my cache entry but only tells me its size and some stats about the file. If it also returned thekey
then I could useget.info
.The only alternative I can really see to get the info (including
metadata
which I'm really interested in) is usingls
and iterating over its output but that seems kinda crazy!Also, I see that
cache.get.byDigest
does not return metadata by design so there is probably a technical reason this is not possible?Expected Behavior
No response
Steps To Reproduce
No response
Environment
No response
The text was updated successfully, but these errors were encountered: