Add caching and DB index to events
More tweaks, nearly there...