Eviction

Every time PHP starts, Relay will allocate a fixed amount of memory as part of the master process.

By default, 32MB are allocated and when that limit is reached Relay will act just like PhpRedis without storing additional keys locally.

Similar to Redis, you may alter the eviction policy used when the memory limit is reached using the relay.eviction_policy directive, as well as the amount of allocated memory using the relay.maxmemory directive.

Eviction policies

Policy Description
noeviction Throws an exception if the memory limit has been reached when trying to insert more data
random Randomly evicts keys out of all keys when relay.maxmemory_pct is reached
lru Evicts the least recently used keys out of all keys when relay.maxmemory_pct is reached