protected function resolve($name)
	{
		$config = $this->getConfig($name);

		if (is_null($config))
		{
			throw new InvalidArgumentException('Cache config is not defined.');
		}

		if (!isset($config['hash']))
		{
			$config['hash']      = $this->app->hash('');
		}
		if (!isset($config['cachebase']))
		{
			$config['cachebase'] = PATH_APP . DS . 'cache' . DS . (isset($this->app['client']->alias) ? $this->app['client']->alias : $this->app['client']->name);
		}

		if (isset($this->customCreators[$name]))
		{
			$config['cache_handler'] = $name;

			return $this->callCustomCreator($config);
		}
		else
		{
			$class = __NAMESPACE__ . '\\Storage\\' . ucfirst($name);

			if (!class_exists($class))
			{
				throw new InvalidArgumentException("Cache store [{$name}] is not defined.");
			}

			return new $class((array) $config);
		}
	}