private function loadMetadataFromCache($ident, array $idents = null)
    {
        $cacheKey  = $this->cacheKeyFromMetaKey($ident);
        $cacheItem = $this->cachePool()->getItem($cacheKey);

        if ($cacheItem->isHit()) {
            $metadata = $cacheItem->get();

            /** Backwards compatibility */
            if ($metadata instanceof MetadataInterface) {
                $metadata = $metadata->data();
                $cacheItem->set($metadata);
                $this->cachePool()->save($cacheItem);
            }

            return $metadata;
        } else {
            if (empty($idents)) {
                $metadata = $this->loadMetadataByKey($ident);
            } else {
                $metadata = $this->loadMetadataByKeys($idents);
            }

            $cacheItem->set($metadata);
            $this->cachePool()->save($cacheItem);
        }

        return $metadata;
    }