RTK Query Cache Invalidation with Tags Best Practices
Summary RTK Query uses tags to manage cache invalidation automatically. A tag is a simple string (or an object with type and id) attached to a query result. When a mutation declares that it provides or invalidates specific tags, RTK Query knows which cached queries must be refreshed. Root Cause The need for tags stems … Read more