public function RedisMock::setTimeout

Sets an expiration time on an item.

Parameters

string $key:

integer $ttl:

Return value

boolean

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/Mock/RedisMock.php, line 112

Class

RedisMock
RedisMock for simulating Redis extension in tests.

Namespace

Symfony\Component\HttpKernel\Tests\Profiler\Mock

Code

public function setTimeout($key, $ttl) {
  if (!$this->connected) {
    return false;
  }
  if (isset($this->storage[$key])) {
    return true;
  }
  return false;
}