Skip to content

Instantly share code, notes, and snippets.

@rohit1101
Last active October 14, 2022 06:59
Show Gist options
  • Save rohit1101/0546e81d2e9e49e96d9c83104e20d9c9 to your computer and use it in GitHub Desktop.
Save rohit1101/0546e81d2e9e49e96d9c83104e20d9c9 to your computer and use it in GitHub Desktop.
Automate stellate purging
Currently we have implemented manual cache clear using a plugin.
But since we need to automate the cache clear on stellate if anyone adds, updates or deletes content on strapi prod we need to think how to implement this.
As you suggested we can try to use webhook, but the problem with webhook is that there is not support for webhook integration from stellate (strapi supports webhook integrations).
And we also need a URL to provide for the webhook on strapi to trigger an event(adds, updates or deletes content on strapi) to purge cache on stellate.
I raised a query to stellate team to check if there are any support or alternatives for webhook support, but currently they are not focussing on webhooks and integration and they are focussed on improving performance of edge cache.
The response which i received from stellate:
Yeah, if you want a more specific integration with the CMS, it is highly likely that you would need to build some sort of translation layer that receives webhooks from the CMS, including whatever meta data the CMS provides and then takes that data and translates it into a request to the Purging API that invalidates the specific responses that changed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment