Cached Recipes
just will skip invocations of recipes with the [cache]
attribute1.54.0 if it finds an entry matching the invocation in the
cache. The [cache] attribute may only be used with script recipes and is
currently unstable.
For example, this recipe will be skipped if image.jpg exists and the contents
of image.png and the output of convert -version haven’t changed since the
last run:
set unstable
[script]
[cache(inputs = "image.png", outputs = "image.jpg", extra = `convert -version`)]
convert:
convert image.png image.jpg
Unlike many other features of just, which are, hopefully, well thought-out
and user-friendly, cached recipes are inherently fragile. It is important to
understand their limitations before relying on them. Please read this section
thoroughly, including the friendly admonitions below.