private function getCacheInstance(array $config)
    {
        if (!isset($config['enable']) || !$config['enable']) {
            return null;
        }

        $className = $config['adapter'];
        if (!class_exists($className)) {
            $errMsg = sprintf('Adapter "%s" is not supported for caching', $config['adapter']);
            throw new Exception\RuntimeException($errMsg);
        }
        return new $className($config['options']);
    }