add cache for chat messages