You are here

constant CacheBase::KEY_THRESHOLD in Redis 8

Computed keys are let's say around 60 characters length due to key prefixing, which makes 1,000 keys DEL command to be something around 50,000 bytes length: this is huge and may not pass into Redis, let's split this off. Some recommend to never get higher than 1,500 bytes within the same command which makes us forced to split this at a very low threshold: 20 seems a safe value here (1,280 average length).

File

src/Cache/CacheBase.php, line 43

Class

CacheBase
Base class for redis cache backends.

Namespace

Drupal\redis\Cache

Code

const KEY_THRESHOLD = 20;