protected function _create($class, $alias, $config)
    {
        if (is_object($class)) {
            $instance = $class;
        }

        unset($config['className']);
        if (!isset($instance)) {
            $instance = new $class($config);
        }

        if (!($instance instanceof CacheEngine)) {
            throw new RuntimeException(
                'Cache engines must use Cake\Cache\CacheEngine as a base class.'
            );
        }

        if (!$instance->init($config)) {
            throw new RuntimeException(
                sprintf('Cache engine %s is not properly configured.', get_class($instance))
            );
        }

        $config = $instance->getConfig();
        if ($config['probability'] && time() % $config['probability'] === 0) {
            $instance->gc();
        }

        return $instance;
    }