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); }