patronage / bubs-next

Headless Wordpress + Next.js Project scaffolding
https://bubs-next.vercel.app
MIT License
37 stars 10 forks source link

refactor: use stellate plugin instead of custom code for graphql cache management #264

Closed ccorda closed 1 month ago

ccorda commented 1 year ago

Curently we have a webhooks.php file that pings a Next.js route to purge the stellate cache. It's a crude implementation that only implements purgeAll.

This PR will look to remove our custom code and use the Stellate WP plugin to purge directly.

Testing (as we go from purgeAll to granular, need to make sure we're not introducing errors):

We'll also want to look at how we clone environments (from prod to staging and local), to make sure we're not clearing the cache as we do staging or local development.

closes #226 closes #204

vercel[bot] commented 1 year ago

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

Name Status Preview Comments Updated (UTC)
bubs-next ✅ Ready (Inspect) Visit Preview May 10, 2024 6:53am
ccorda commented 4 months ago

Should https://github.com/patronage/bubs-next/blob/main/website/src/pages/api/graphcdn.js go away now?

ccorda commented 4 months ago

@chrisherold implemented this this morning on a site and left a few more comments on code.

One issue I'm running into is that it works when I update /sample-page, but not when I update the homepage:

Screenshot 2024-04-24 at 10 24 16 AM

chrisherold commented 3 months ago

Should https://github.com/patronage/bubs-next/blob/main/website/src/pages/api/graphcdn.js go away now?

yep, removed

chrisherold commented 3 months ago

@chrisherold implemented this this morning on a site and left a few more comments on code.

One issue I'm running into is that it works when I update /sample-page, but not when I update the homepage:

Screenshot 2024-04-24 at 10 24 16 AM

updated