get( 'cache/frontend/default/backend_options' ); $this->redis = new Credis_Client( $options['server'] ?? '127.0.0.1', (int)($options['port'] ?? 6379), (float)($options['timeout'] ?? 2.5), '', (int)($options['database'] ?? 0), $options['password'] ?? null ); if (!empty($options['key_prefix'])) { $this->redis->setPrefix($options['key_prefix']); } } public function get(string $key) { return $this->redis->SMEMBERS($key); } public function set(string $key, $value) { $this->redis->sAdd($key, $value); } public function isExist(string $key, $value) { return $this->redis->sIsMember($key, $value); } }