Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: added logging for cache handling (#38654) #38660

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion packages/gatsby-adapter-netlify/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,13 @@ const createNetlifyAdapter: AdapterInit<INetlifyAdapterOptions> = options => {
reporter.verbose(
`[gatsby-adapter-netlify] using @netlify/cache-utils restore`
)
return await utils.restore(directories)
const didRestore = await utils.restore(directories)
if (didRestore) {
reporter.info(
`[gatsby-adapter-netlify] Found a Gatsby cache. We're about to go FAST. ⚡`
)
}
return didRestore
}

return false
Expand All @@ -50,6 +56,9 @@ const createNetlifyAdapter: AdapterInit<INetlifyAdapterOptions> = options => {
`[gatsby-adapter-netlify] using @netlify/cache-utils save`
)
await utils.save(directories)
reporter.info(
`[gatsby-adapter-netlify] Stored the Gatsby cache to speed up future builds. 🔥`
)
}
},
},
Expand Down