Hello,
I think I’m missing some concepts around cache management.
We’re writing a module for which we want to offer a fluid interface
Something like
MyModule().withOption1().run()
with withOption1(value: bool) implementation as follow :
self.option1 = value
and run :
ctr = ctr.withExec(["x"]) if (self.option1) else ctr.exec(["y"])
Our problem is that all successive calls to run will use the same cache, regardless of the withOption1(true|false)prior call.
In other words, MyModule().withOption1(true).run() will (wrongly) use the cache produced by a previous MyModule().withOption1(false).run()
Is there some documentation on which state is used to compute a cache key ?
As a side question, is there a way to manually define a cache key ?
[Edit : that doesn't seem to be the case yet, according to this doc: https://docs.dagger.io/cookbook#invalidate-cache]
Thanks !