Caching Plasmic component for SSG render

During my build process, I’m doing SSG rendering of ~2000 versions of the same SEO landing page. They all share the same Plasmic component that renders a simple footer. Currently I’m doing this within my getStaticProps function, so I see “Plasmic doing a fresh fetch…” 2000 times.

This seems pretty inefficient. Is there a recommended pattern for caching commonly used Plasmic components? I can think of various hacky ways to do it but would love suggestions

Here’s the relevant code within getStaticProps():

        const componentNames: string[] = ["Footer Section"];
        const plasmicData = await PLASMIC.fetchComponentData(...componentNames);
        const compMeta = plasmicData.entryCompMetas[0];
        const componentProps = {};

        const { origins, month, vibes } = query;
        const cityFinderData: CityFinderData = await getCityFinderData(origins, month, vibes);

        return {
            props: {

yup :pensive: unfortunately I think there’s no way to differentiate between when getStaticProps() is called during build (when you’d want to cache as much as possible) or during revalidate (when you don’t want to cache at all)…

gotcha, makes sense

seems like codegen mode would not have this problem right? this might be the thing that gets me to finally make the leap from headless to codegen