redis Redis String datatype

30% OFF - 9th Anniversary discount on Entity Framework Extensions until December 15 with code: ZZZANNIVERSARY9

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?