redis Redis String datatype

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Introduction

Redis provides a string datatype that is used to associate data with a particular key. Redis string are the most basic datatype available in Redis and one of the first datatypes that users learn to work with.

Strings are often associated with text data, but Redis strings are more like buffers that can be used to store a wide range of different data. Redis strings can be used to represent integers, floating point numbers, bitmaps, text, and binary data.

Syntax

  • SET key value [EX seconds] [PX milliseconds] [NX|XX]
  • INCR key
  • INCRBY key increment
  • INCRBYFLOAT key increment
  • DECR key
  • DECRBY key decrement


Got any redis Question?