Change from an array to an object for storing caches with metadata