Understand Urql's Document Cache Exchange and Request Policies

InstructorIan Jones

Share this video with your friends

Send Tweet

We learn about the default cacheExchange that urql provides. The default cacheExchange is a document cache. Document cache's hash the query and variables as the key as store the result under that key.

Urql's cacheExchange has multiple request policies:

  • cache-first
  • cache-only
  • network-only
  • cache-and-network

cache-first is the default request policy.