Below we are using the single field to define the HMSET command. At the time of using the HMSET command to retrieve the value, we are using hget command. The below example shows how we can create the HMSET command as follows. The value argument is simply the value we defined for the field. hstrlen ( K key, K field) Get the string length of the field value in a hash. hsetnx ( K key, K field, V value) Set the value of a hash field, only if the field does not exist. hset ( K key, Map map) Set multiple hash fields to multiple values. If the keys get very large you may want to use HSCAN. $this->_redis_client->hkeys ('client/9999/products') Unlike KEYS, the complexity of HKEYS is O (N) where N is the size of the hash (NOT the size of the entire database). HKEYS client/9999/products 1) id_547 2) whatever_key_you_want.the client will not complain about HMSET deprecation when connected to redis server >=2.0, HSET myhash field1 "Hello" Unexpected token HSET myhash field2 "World" Unexpected token HMGET myhash field1 field2 nofield Unexpected token. long answer: node-redis package will use the redis engine of the redis server instance being connected to. short answer: it's not (but this is not the answer you're looking for). If you set daily hash key, you can set a keys time to live. Redis expire command is for all keys in the hash. If you want to expire specific keys in the hash older then 1 month. Preparing for the brightest future, High School for Energy and Technology is pioneering the field of education through our dedication and commitment to our students’ needs.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |