public static function cache(Cache $config = null, bool $getShared = true)
	{
		if ($getShared)
		{
			return static::getSharedInstance('cache', $config);
		}

		if (! is_object($config))
		{
			$config = new Cache();
		}

		return CacheFactory::getHandler($config);
	}
public static function cache(Cache $config = null, bool $getShared = true)
	{
		if ($getShared)
		{
			return static::getSharedInstance('cache', $config);
		}

		if (! is_object($config))
		{
			$config = new Cache();
		}

		return CacheFactory::getHandler($config);
	}
public static function cache ( Cache $ config = null , bool $ getShared = true ) { if ( $ getShared ) { return static :: getSharedInstance ( 'cache' , $ config ) ; } if ( ! is_object ( $ config ) ) { $ config = new Cache ( ) ; } return CacheFactory :: getHandler ( $ config ) ; }
The cache class provides a simple way to store and retrieve
complex data for later.

@param \Config\Cache $config
@param boolean       $getShared

@return \CodeIgniter\Cache\CacheInterface
The cache class provides a simple way to store and retrieve complex data for later .