public function getCachedExperiment($name)
    {
        if ($this->cache->contains($name)) {
            $experiment = $this->cache->fetch($name);
        } elseif ($this->has($name)) {
            $experiment = $this->get($name)->getSerializableData();
        } else {
            return null;
        }

        if (!isset($experiment['type']) || $experiment['type'] !== 'experiment') {
            throw new LogicException(
                sprintf('The setting `%s` was found but it is not an experiment', $name)
            );
        }

        $this->cache->save($name, $experiment);

        return $experiment;
    }