#How does function caching interact with

1 messages ยท Page 1 of 1 (latest)

slate moat
#

They both exist. The function caching applies to whether the entire function will execute, whereas layer caching is the same as before.

Are you asking whether the function cache TTL/no-cache/etc. applies to containers created inside the function? If so, no it doesn't, at least not yet. It only applies to whether the function itself is invoked to get a result or just read from cache.

If you were asking something else lemme know ๐Ÿ™‚

frank lance
#

Ok I think that makes sense. Yes, that's what I was asking. For example, I have a "artifactPush" that I want to always run. But just setting // +cache="never" isn't sufficient according to the above. I'd also have to do the timestamp env var to actually ensure that the withExec is always run.

I think the function caching docs would benefit from an update and cross link to - https://docs.dagger.io/features/caching with another cross link to invalidating the cache - https://docs.dagger.io/cookbook/builds/#invalidate-cache.

Docs around caching are a bit scattered at the moment and the multiple layers of complexity makes it more confusing ๐Ÿ™‚

slate moat