Simple operation of Redis

Source: Internet
Author: User

Use Hset in your code today to deposit in Redis: Jedis.hset (Key.getbytes (), Field.getbytes (), Objectinfopojo);

You need to verify that data is stored in Redis in Redis.

First go in. Redis Client: REDIS-CLI

Related commands: Get all key keys *

Today's focus is on Ha Hset.

S.N. Commands and Instructions
1 Hdel key Field2 [Field2]
Delete one or more hash fields
2 Hexists key Field
Determine whether a hash field exists or not
3 Hget key Field
Gets the value stored in the specified key hash field
4 Hgetall Key
Let all fields and values be stored in a hash of the specified key
5 Hincrby key field Increment
Integer value of the hash field increased by the given number
6 Hincrbyfloat key field Increment
The floating-point value of the hash field by the given increment amount
7 Hkeys Key
Gets all the hash fields in the
8 Hlen Key
Gets the number of hash fields
9 Hmget key field1 [Field2]
Gets the value of all given hash fields
10 Hmset key field1 value1 [Field2 value2]
Set multiple values for multiple hash fields
11 Hset key field value
Set the string value of a hash field
12 Hsetnx key field value
Sets the value of the hash field only if the field does not exist
13 Hvals Key
Get all values in the hash
14 HSCAN key cursor [MATCH pattern] [count Count]
Incremental iteration hash fields and related values

Simple operation of Redis

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.