We would like to have Environment condition for Invalidate Cache Tags webhook, similarly to what is available for Record updates.
We have dev and staging DatoCMS environments, in addition to the main one, to be used on dev and staging environments of our e-commerce platforms. We want to use cache tags on all of them to have he same codebase and functionality across all environments. The problem we have is the Webhook to invalidate Cache Tags doesn’t have an environment setting. That’s why we have 3 of them defined for each of our deployed environments. Because there is no way to specify DatoCMS environment used, it results in webhook being sent to all 3 environments when only 1 DatoCMS environment was updated. We often seed 50k+ records for various test purposes. This leads to 150+ webhook invocations across all 3 deployed environments. We use a serverless environment for our services, so having 3x instead of 1x invocations greatly increases the total number of invocations per month and the cost.
(Moderator note: This customer also emailed us the same question, and we are internally investigating this. Will report back soon.)