So the hook to invalidate the cache is a little buried. Basically, when a task wants to start, it proposes a state transition (e.g. I want to be Running) and it’s in that call that you can invalidate. This is
the endpoint and
this is a PR that introduces a kwarg to invalidate a cache on run. It doesn’t so much invalidate it as it does overwrite it.