You are here

constant Redis_Cache_Base::EVAL_DELETE_PREFIX in Redis 7.2

Same name and namespace in other branches
  1. 7.3 lib/Redis/Cache/Base.php \Redis_Cache_Base::EVAL_DELETE_PREFIX

Delete by prefix lua script

File

lib/Redis/Cache/Base.php, line 80

Class

Redis_Cache_Base
Because those objects will be spawned during boostrap all its configuration must be set in the settings.php file.

Code

const EVAL_DELETE_PREFIX = <<<EOT
local keys = redis.call("KEYS", ARGV[1])
for i, k in ipairs(keys) do
    redis.call("DEL", k)
end
return 1
EOT
;