1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    Understand Urql's Document Cache Exchange and Request Policies

    Ian JonesIan Jones
    graphqlGraphQL

    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.

    Code

    Code

    Become a Member to view code

    You must be a Member to view code

    Access all courses and lessons, track your progress, gain confidence and expertise.

    Become a Member
    and unlock code for this lesson
    Discuss

    Discuss