redis = $redis_prov->getRedisClient(); $this->jo_json_info_key = $jo_json_info_key; } public function addJOJsonInfo($jo_id, $jo_data) { $key = $jo_id; $this->redis->hset($this->jo_json_info_key, $key, $jo_data); } public function findJOJsonInfo($jo_id) { $jo_data = ''; $key = $jo_id; // check if JO id is in redis hash $is_exist = $this->redis->hexists($this->jo_json_info_key, $key); if ($is_exist) { // get the data $jo_data = $this->redis->hget($this->jo_json_info_key, $key); } return $jo_data; } }