Skip to content

Commit

Permalink
Merge pull request #69 from fedotov-as/feature/constants
Browse files Browse the repository at this point in the history
Add new constants
  • Loading branch information
ukko authored May 25, 2020
2 parents dc5f370 + 06407d3 commit 0b36c0d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/Redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ class Redis
const OPT_READ_TIMEOUT = 3;
const OPT_SCAN = 4;
const OPT_SLAVE_FAILOVER = 5;
const OPT_TCP_KEEPALIVE = 6;
const OPT_COMPRESSION = 7;
const OPT_REPLY_LITERAL = 8;
const OPT_COMPRESSION_LEVEL = 9;

/**
* Cluster options
Expand All @@ -42,6 +46,20 @@ class Redis
const SERIALIZER_MSGPACK = 3;
const SERIALIZER_JSON = 4;

/**
* Compressions
*/
const COMPRESSION_NONE = 0;
const COMPRESSION_LZF = 1;
const COMPRESSION_ZSTD = 2;

/**
* Compression ZSTD levels
*/
const COMPRESSION_ZSTD_MIN = 1;
const COMPRESSION_ZSTD_DEFAULT = 3;
const COMPRESSION_ZSTD_MAX = 22;

/**
* Multi
*/
Expand All @@ -58,6 +76,7 @@ class Redis
const REDIS_LIST = 3;
const REDIS_ZSET = 4;
const REDIS_HASH = 5;
const REDIS_STREAM = 6;

/**
* Creates a Redis client
Expand Down

0 comments on commit 0b36c0d

Please sign in to comment.