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

Allow partial keys when invalidating cached query #224

Open
marcopiii opened this issue May 27, 2020 · 0 comments
Open

Allow partial keys when invalidating cached query #224

marcopiii opened this issue May 27, 2020 · 0 comments
Labels

Comments

@marcopiii
Copy link
Member

Suppose we have a query

export const myQuery = compose(
  product({ a: param<string>(), b: param<string>(), c: param<string>() }),
  queryShallow( 
    ({ a, b, c }) => ...do stuff... ,
    available
  )
);

And a command which invalidates it

export const myCommand = command(
  (input: { a: string }) =>  ...  ),
  { myQuery }
);

When we use the command we have to declare a combination of parameters a, b, c for which the cached value is no longer valid.

But if we want to invalidate all the cached values associated with the all the keys which contains a (something like a, *, *) there is no way to do it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants