Skip to content

[QUESTION] Get info by integrity? #166

@samblackmore

Description

@samblackmore

Is there an existing issue for this?

  • I have searched the existing issues

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 a key and get.info.byDigest doesn't exist. I see cacache.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 the key then I could use get.info.

The only alternative I can really see to get the info (including metadata which I'm really interested in) is using ls 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions