Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

Cache control #70

Open
3 tasks
maowtm opened this issue Dec 28, 2021 · 0 comments
Open
3 tasks

Cache control #70

maowtm opened this issue Dec 28, 2021 · 0 comments
Assignees

Comments

@maowtm
Copy link
Contributor

maowtm commented Dec 28, 2021

I had a discussion with @barr, and he suggested to use operators that define conditions of cache invalidation. We were thinking of something like that:

  • ::no_cache always invalidate the cache
  • ::invalidate_cache_if_before(CMD) invalidate cache if CMD, executed before the layer is applied, returns non-exit code.
  • ::invalidate_cache_if_after(CMD) invalidate cache if CMD, executed after the layer is applied, returns non-exit code.
  • ::invalidate_cache_if_changed(PATH) invalidate cache if the file/directory changes after the layer is applied.

This is just a rough sketch of the API.

Originally posted by @mechtaev in #57 (comment)

Or maybe something like ::invalidate_cache_if_different(CMD_BEFORE, CMD_AFTER)

Originally posted by @mechtaev in #57 (comment)

  • Implement the builtin
  • Implement for buildkit
  • Implement for Dockerfile (things other than a simple ::no_cache may not be possible)
@maowtm maowtm self-assigned this Jan 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant