code: public function write(string $id, array $data, int $startTime, int $accessTime)
      {
          $saveData = [
              'startTime' => $startTime,
              'accessTime' => $accessTime,
              'data' => $data,
          ];
  
          $stringData = self::serialize($saveData);
          if ($this->client->setex($this->getKey($id), $this->getDuration(), $stringData)) {
              return false;
          } else {
              return strlen($stringData);
          }
      }
docs: {@inheritdoc}