You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operation API cache/report reuse is based on the definition + input of
the operation, sometimes we have use cases where the input is the same
but the dependency is not the same and user would like the operation for
it to be executed instead of being reused with the existing
cache/reports. Eg when the chain client passed into dep can be for
different chains but implements the same interface.
Because of this, users have made
[workarounds](https://github.com/smartcontractkit/payments/blob/5462c054fd879a0da77fffd68fa7b0c069d36d2d/changeset/shared/operations/access_control.go#L180-L185)
by passing chain-selectors or custom uuid into the input purely for
cache breaking reasons.
This change introduce an extra hash key that user can provide as a
differentiator. The API will also consider this new key as part of the
hash key for reusing previous successful results. By providing this key,
user avoid having to introduce extra placeholder param in the input
struct.
```go
result, err = operations.ExecuteOperation(bundle, op, deps, input, operations.WithIdempotencyKey[InputType, DepsType](extra-key))
```
This change originated from discussing with Rayene and Rens.
JIRA: https://smartcontract-it.atlassian.net/browse/CLD-2579
0 commit comments