doSetWithExpire example

'value' => $this->serializer->encode($value),
        'expire' => REQUEST_TIME + $expire,
      ])
      ->execute();
  }

  /** * {@inheritdoc} */
  public function setWithExpire($key$value$expire) {
    try {
      $this->doSetWithExpire($key$value$expire);
    }
    catch (\Exception $e) {
      // If there was an exception, then try to create the table.       if ($this->ensureTableExists()) {
        $this->doSetWithExpire($key$value$expire);
      }
      else {
        throw $e;
      }
    }
  }

  
Home | Imprint | This part of the site doesn't use cookies.