You are here

constant Redis_Cache_Base::EVAL_DELETE_VOLATILE in Redis 7.3

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

Delete volatile by prefix lua script

File

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

Class

Redis_Cache_Base
@todo

Code

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