-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Description
Is there a nice and easy way to set a condition to invalidate a cached query against? Think about time-to-live (TTL) or custom conditions.
For example (pseudo-code warning):
query(...).invalidateIf(fiveMinutesHavePassed())
or
query(...).invalidateIf(state.user.hasNewMessages)
forceFetch
serves its purpose, but I think the cache invalidation condition should be able to live close to the query(cache) itself. This way I don't need to check manually if there's a forceFetch required when I rerender a container. The query already knows when it's outdated.
youngboy, scf4, heldr, DimitryDushkin, iki and 39 more
Metadata
Metadata
Assignees
Labels
No labels