Skip to main content

CacheNone
utility

The CacheNone() strategy instructs caches not to store any data. The function accepts no arguments.

Learn more about data fetching in Hydrogen.

NoStoreStrategy

mode
string
Was this section helpful?

Example code

import {CacheNone} from '@shopify/hydrogen';

export async function loader({context}) {
const data = await context.storefront.query(
`#grahpql
{
shop {
name
description
}
}
`,
{
cache: CacheNone(),
},
);

return data;
}