Support events other than publish

This refreshes the cache on all relevant events rather than just publish, solving an issue where content was  published but not removed from the front-end server.

The method of refreshing the cache is different, because the API you were using requires knowledge of whether to add/update or remove the document from the cache. It would likely be better to return to that approach as a further improvement because it's more targeted, but that requires more refactoring to store the event type in the database along with the 'publish' request to update the cache.