#Is it possible to get a CacheVolume's key
1 messages · Page 1 of 1 (latest)
Can you share more details on what you are trying to do?
A cache volume is typically referenced by whatever key you give it when you name it:
dag.cacheVolume("node-21")
So as long as you use "node-21" then you are always referring to the same volume.
I think the issue is doing this:
func Build(cache *dagger.CacheVolume) *dagger.Container {
// How to get the key back out of a cache volume object?
cacheKey := cache.????()
}
You're right that it's probably not available in the API today @ember python . May I ask what your use case is? If we can avoid exposing low-level details unnecessarily, we tend to prefer that, out of caution - a promise never made is a promis never broken 🙂 But it all depends on the use case.