Skip to content

Commit 4a76878

Browse files
chore: added logging for cache handling (#38654) (#38660)
* chore: added logging for cache handling * Update packages/gatsby-adapter-netlify/src/index.ts Co-authored-by: Michal Piechowiak <[email protected]> --------- Co-authored-by: Michal Piechowiak <[email protected]> (cherry picked from commit f642940) Co-authored-by: Hrishikesh Kokate <[email protected]>
1 parent 470d182 commit 4a76878

File tree

1 file changed

+10
-1
lines changed
  • packages/gatsby-adapter-netlify/src

1 file changed

+10
-1
lines changed

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,13 @@ const createNetlifyAdapter: AdapterInit<INetlifyAdapterOptions> = options => {
3838
reporter.verbose(
3939
`[gatsby-adapter-netlify] using @netlify/cache-utils restore`
4040
)
41-
return await utils.restore(directories)
41+
const didRestore = await utils.restore(directories)
42+
if (didRestore) {
43+
reporter.info(
44+
`[gatsby-adapter-netlify] Found a Gatsby cache. We're about to go FAST. ⚡`
45+
)
46+
}
47+
return didRestore
4248
}
4349

4450
return false
@@ -50,6 +56,9 @@ const createNetlifyAdapter: AdapterInit<INetlifyAdapterOptions> = options => {
5056
`[gatsby-adapter-netlify] using @netlify/cache-utils save`
5157
)
5258
await utils.save(directories)
59+
reporter.info(
60+
`[gatsby-adapter-netlify] Stored the Gatsby cache to speed up future builds. 🔥`
61+
)
5362
}
5463
},
5564
},

0 commit comments

Comments
 (0)