src/Psr16Manager.php
public function setMultiple(array $values, int $ttl = null)
    {
        $valuesNormalized = [];

        foreach ($values as $key => $value) {
            $valuesNormalized[$this->normalized($key)] = $value;
        }

        $result = static::$handler->setMultiple(
            $valuesNormalized,
            $ttl ?? $this->ttl
        );

        if ($result) {
            if ($this->assistant) {
                foreach (array_keys($valuesNormalized) as $key) {
                    $this->assistant->add($key);
                }
                $this->assistant->save();
            }
        }

        return $result;
    }
public function setMultiple(array $values, int $ttl = null)
    {
        $valuesNormalized = [];

        foreach ($values as $key => $value) {
            $valuesNormalized[$this->normalized($key)] = $value;
        }

        $result = static::$handler->setMultiple(
            $valuesNormalized,
            $ttl ?? $this->ttl
        );

        if ($result) {
            if ($this->assistant) {
                foreach (array_keys($valuesNormalized) as $key) {
                    $this->assistant->add($key);
                }
                $this->assistant->save();
            }
        }

        return $result;
    }
Store multiple items in the cache for a given number of minutes.

@param array                                $values key、value表
@param \DateTimeInterface|\DateInterval|int $ttl    生命值，秒