public function getMetadata($className, $subset)
	{
		$classMetadataCacheKey = $this->getClassMetadataCacheKey($className);
		$classMetadata = $this->cacheStorage->getItem($classMetadataCacheKey);
		if ($classMetadata === null)
		{
			$classMetadata = $this->readClassMetadata($className);
			$this->cacheStorage->addItem($classMetadataCacheKey, $classMetadata);
		}
		if (!is_array($classMetadata))
		{
			throw new \LogicException(sprintf('Invalid metadata for class %s.', $className));
		}
		if (!isset($classMetadata[$subset]))
		{
			throw new \LogicException(sprintf('No metadata for subset "%s" in class %s.', $subset, $className));
		}
		$subsetMetadata = $classMetadata[$subset];
		if (!($subsetMetadata instanceof DT\Metadata))
		{
			throw new \LogicException(sprintf('Invalid metadata for subset "%s" in class %s.', $subset, $className));
		}
		return $subsetMetadata;
	}