public function set(string $key, $value, int $ttl = null): void
    {
        $keyMD5 = md5($key);
        $key = $this->keyPrefix . substr($keyMD5, 0, 3) . '/' . substr($keyMD5, 3) . '.2';
        $this->dataRepository->setValue($key, gzcompress(serialize([$ttl > 0 ? time() + $ttl : 0, $value])));
    }