Creating a cache for a entities.