Caching messages state to reduce DB load