Function useQueryCache Beta
useQueryCache(): {
clear: () =>void; } |undefined
React hook that returns the QueryCacheClient module instance to control query cache.
How to enable query cache see in Query Caching guide
Returns
{ clear: () => void; } | undefined
QueryCacheClient instance
Example
import { useQueryCache } from '@sisense/sdk-ui';
const CodeExample = () => {
const queryCache = useQueryCache();
return <button onClick={() => queryCache?.clear()}>Clear query cache</button>;
};
export default CodeExample;