public static function writeMany($data, $config = 'default')
    {
        $engine = static::engine($config);

        $return = $engine->writeMany($data);
        foreach ($return as $key => $success) {
            if ($success === false && $data[$key] !== '') {
                throw new RuntimeException(sprintf(
                    '%s cache was unable to write \'%s\' to %s cache',
                    $config,
                    $key,
                    get_class($engine)
                ));
            }
        }

        return $return;
    }
public static function writeMany($data, $config = 'default')
    {
        $engine = static::engine($config);

        $return = $engine->writeMany($data);
        foreach ($return as $key => $success) {
            if ($success === false && $data[$key] !== '') {
                throw new RuntimeException(sprintf(
                    '%s cache was unable to write \'%s\' to %s cache',
                    $config,
                    $key,
                    get_class($engine)
                ));
            }
        }

        return $return;
    }
public static function writeMany ( $ data , $ config = 'default' ) { $ engine = static :: engine ( $ config ) ; $ return = $ engine -> writeMany ( $ data ) ; foreach ( $ return as $ key => $ success ) { if ( $ success === false && $ data [ $ key ] !== '' ) { throw new RuntimeException ( sprintf ( '%s cache was unable to write \'%s\' to %s cache' , $ config , $ key , get_class ( $ engine ) ) ) ; } } return $ return ; }
Write data for many keys into cache.

### Usage:

Writing to the active cache config:

```
Cache::writeMany(['cached_data_1' => 'data 1', 'cached_data_2' => 'data 2']);
```

Writing to a specific cache config:

```
Cache::writeMany(['cached_data_1' => 'data 1', 'cached_data_2' => 'data 2'], 'long_term');
```

@param array $data An array of data to be stored in the cache
@param string $config Optional string configuration name to write to. Defaults to 'default'
@return array of bools for each key provided, indicating true for success or false for fail
@throws \RuntimeException
Write data for many keys into cache .