Directus / @directus/memory / index / SET_MAX_SCRIPT
Variable: SET_MAX_SCRIPT ​
const
SET_MAX_SCRIPT: "\n local key = KEYS[1]\n local value = tonumber(ARGV[1])\n\n if redis.call("EXISTS", key) == 1 then\n local oldValue = tonumber(redis.call('GET', key))\n\n if value <= oldValue then\n return false\n end\n end\n\n redis.call('SET', key, value)\n\n return true\n"