Is it possible to listen to cache clear events?

From either Workers or Apps is it possible to register to listen for when a cache is cleared in CF?

If you mean to find out when a file rolls out of the cache, no. But you can use the API to go through Audit Logs to look for a Purge command.

That’s handy, thanks

1 Like