Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
onPreInit bug
exports.onPreInit = (gatsbyApi, pluginOptions) => {}
exports.sourceNodes = async (gatsbyApi) => {
const {cache, reporter} = gatsbyApi
reporter.info('Testing cache');
reporter.info(await cache.get('test'));
reporter.info('Setting cache');
await cache.set('test', 'someValue');
reporter.info('Checking if set succesfully');
reporter.info(await cache.get('test'));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment