Dynamic distributed in-memory cache