public function getMany(array $keys, $default = null)
    {
        $keys = array_fill_keys($keys, $default);

        if (! method_exists($this->store, 'getMany')) {
            return array_combine(array_keys($keys), array_map([$this, 'get'], array_keys($keys), array_values($keys)));
        }

        $values = array_combine(array_keys($keys), $this->store->getMany(array_keys($keys)));

        foreach ($values as $key => &$value) {
            if (is_null($value)) {
                $this->fireCacheEvent('missed', [$key]);

                $value = value(array_get($keys, $key, $default));
            } else {
                $this->fireCacheEvent('hit', [$key, $value]);
            }
        }

        return $values;
    }
public function getMany(array $keys, $default = null)
    {
        $keys = array_fill_keys($keys, $default);

        if (! method_exists($this->store, 'getMany')) {
            return array_combine(array_keys($keys), array_map([$this, 'get'], array_keys($keys), array_values($keys)));
        }

        $values = array_combine(array_keys($keys), $this->store->getMany(array_keys($keys)));

        foreach ($values as $key => &$value) {
            if (is_null($value)) {
                $this->fireCacheEvent('missed', [$key]);

                $value = value(array_get($keys, $key, $default));
            } else {
                $this->fireCacheEvent('hit', [$key, $value]);
            }
        }

        return $values;
    }
public function getMany ( array $ keys , $ default = null ) { $ keys = array_fill_keys ( $ keys , $ default ) ; if ( ! method_exists ( $ this -> store , 'getMany' ) ) { return array_combine ( array_keys ( $ keys ) , array_map ( [ $ this , 'get' ] , array_keys ( $ keys ) , array_values ( $ keys ) ) ) ; } $ values = array_combine ( array_keys ( $ keys ) , $ this -> store -> getMany ( array_keys ( $ keys ) ) ) ; foreach ( $ values as $ key => & $ value ) { if ( is_null ( $ value ) ) { $ this -> fireCacheEvent ( 'missed' , [ $ key ] ) ; $ value = value ( array_get ( $ keys , $ key , $ default ) ) ; } else { $ this -> fireCacheEvent ( 'hit' , [ $ key , $ value ] ) ; } } return $ values ; }
Retrieve an array of items from the cache by keys.

@param  array  $keys
@param  mixed  $default
@return array
Retrieve an array of items from the cache by keys .