use-http icon indicating copy to clipboard operation
use-http copied to clipboard

how to avoid cache ?

Open grinsteindavid opened this issue 4 years ago • 2 comments
trafficstars

Describe the bug I have set persist to false but cache persist

Expected behavior When persist or/and cache is set to "no-cache" it should not cache its request this feature should be off by default..

grinsteindavid avatar Feb 23 '21 01:02 grinsteindavid

try

import { CachePolicies } from 'use-http'

CachePolicies.NO_CACHE

iamthesiz avatar Feb 26 '21 22:02 iamthesiz

thank u I just did it a week ago with policies in the provider to prevent it by default and choose what endpoints can have cache because almost all routes cannot have cache like auth stuff

grinsteindavid avatar Mar 01 '21 21:03 grinsteindavid