plasmicapp / plasmic

Visual builder for React. Build apps, websites, and content. Integrate with your codebase.
https://www.plasmic.app
MIT License
5.07k stars 416 forks source link

Sanity bloated cache patch #42

Closed K-Kit closed 2 years ago

K-Kit commented 2 years ago

I noticed when running SSR/SSG with the sanity the cache was getting loaded up with thousands of records. It seems like we're loading every record in the database just to get a unique array of docTypes.

Updated to just query for _type then return the filtered array before the value is cached.

vercel[bot] commented 2 years ago

@K-Kit is attempting to deploy a commit to the Plasmic Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] commented 2 years ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
contenful-example ✅ Ready (Inspect) Visit Preview Jun 11, 2022 at 11:24PM (UTC)
plasmic ✅ Ready (Inspect) Visit Preview Jun 11, 2022 at 11:24PM (UTC)
plasmic-blog-example ✅ Ready (Inspect) Visit Preview Jun 11, 2022 at 11:24PM (UTC)
plasmic-blog-starter ✅ Ready (Inspect) Visit Preview Jun 11, 2022 at 11:24PM (UTC)
vercel-workflow ✅ Ready (Inspect) Visit Preview Jun 11, 2022 at 11:24PM (UTC)