MatthiasMullie\Scrapbook\Psr16\SimpleCache::set PHP Method

set() public method

public set ( $key, $value, $ttl = null )
    public function set($key, $value, $ttl = null)
    {
        if (!is_string($key)) {
            throw new InvalidArgumentException('Invalid key: ' . serialize($key) . '. Must be string.');
        }
        $ttl = $this->ttl($ttl);
        return $this->store->set($key, $value, $ttl);
    }