Feature: Refresh cache
Adding the refresh prop to your InstantSearch component gives you
the possibility to refresh the cache.
How to test it?
By default, the 'refresh' prop is disabled. You will need
to open your network tab in the developer tools.
-
Type a query in the SearchBox (for instance
'cellphones'). You should see 10 requests to Algolia
(one per letter)
-
Type 'cellphones' again, you will see that no
additional query is made since the results are retrieved from
the cache
-
Make sure the SearchBox is empty, click on the 'Refresh
cache' button (you should see that Refresh set to true in
the info box below the SearchBox)
-
Type your previous query again: the cache has been cleared and
you will see new requests made to Algolia