INNER CODE UNIT · JavaScript
onPreBuild
felipefialho/felipefialho.com · netlify/plugins/astro-cache/index.js:4
export const onPreBuild = async ({ utils }) => {
const restored = await utils.cache.restore(CACHE_PATHS);
console.log(restored ? 'Restored the Astro and OG caches' : 'No Astro or OG cache to restore');
};
export const onPostBuild = async ({ utils }) => {
const saved = await utils.cache.save(CACHE_PATHS);
console.log(saved ? 'Saved the Astro and OG caches' : 'Nothing to save in the Astro and OG caches');
};