Looking for redis Answers? Try Ask4KnowledgeBase
Looking for redis Keywords? Try Ask4Keywords

redisRedis String datatype


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