Is PlasmicComponentLoader caching requested Plasmic data if in production?

Question? Is the PlasmicComponentLoader caching the requested Plasmic data if NODE_ENV=production ?

Hi Musi, what do you mean more exactly ? The requested plasmic data is cached in the cdn, are you referring to the query data that is executed by components ?

I have Remix project and my test instance has the preview flag, but only see the preview data if I run remix in dev mode. it’s the same for your example remix demo https://github.com/plasmicapp/remix-plasmic-demo

When I run my build Remix application with the runtime env NODE_ENV=development I can fetch the Plasmic preview data of the component

I am going to investigate it

it works if I execute the following for my test environment

PLASMIC.clearCache();
const plasmicData = await PLASMIC.fetchComponentData(plasmicPageSlug);

Ooh I see, the same instance of PLASMIC is being used in the production environment which makes it to use the results previously fetched instead of fetching again

Hi @fmota did you fix this? Now it works also without the PLASMIC.clearCache() to see the latest changes?