Created
September 7, 2020 14:52
-
-
Save vladar/f7c5dca0f3c7a0c472c3f86c19f71656 to your computer and use it in GitHub Desktop.
onPreInit bug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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