Skip to content

Commit

Permalink
chore: added logging for cache handling (#38654) (#38660)
Browse files Browse the repository at this point in the history
* chore: added logging for cache handling

* Update packages/gatsby-adapter-netlify/src/index.ts

Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>

---------

Co-authored-by: Michal Piechowiak <misiek.piechowiak@gmail.com>
(cherry picked from commit f642940)

Co-authored-by: Hrishikesh Kokate <hrishi5200@gmail.com>
  • Loading branch information
gatsbybot and hrishikesh-k committed Oct 24, 2023
1 parent 470d182 commit 4a76878
Showing 1 changed file with 10 additions and 1 deletion.
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

0 comments on commit 4a76878

Please sign in to comment.