Caching with a distributed map