How does it make sense that alerts can run on a cache?

I came across something very bizarre. For some reason, alerts in Looker respect caching policies.

This does not make any sense to me. If an alert runs on a cache that is showing outdated information, it will alert to something that might no longer be true.

I don't want to change the caching policy for my Model because it is useful to cache dashboards for a certain time or until the user forces a refresh. Alerts, however, should never run on a cache.

How do you deal with this issue?

0 3 327
3 REPLIES 3

did you ever find a solution to this? we are coming across the same problem

No, unfortunately not. A workaround is to set the caching policy of the model to be lower than the schedule set on the alert. It requires you to monitor alerts being set up and adjust the cache of the model accordingly, so it’s anything less than ideal.

Hi folks - at present that is indeed the situation, the alerts are based on the caching policy you have defined for the underlying explore. What you could do, if this is not working for you, is create an extended version of the same explore with the sole difference of defining a shorter caching policy, and using this extended explore for building dashboard tiles with alerts. This may or may not be practical depending on your use case, but I'm just flagging that the option exists in case it is helpful.