openresty / lua-resty-redis

Lua redis client driver for the ngx_lua based on the cosocket API
1.91k stars 448 forks source link

How to use ltrim method for list #243

Open vaseniu opened 2 years ago

vaseniu commented 2 years ago

red:eval("return redis.call('ltrim', PAGE_HASH_LIST, 0, 1)", 0)

attempt to call method 'eval' (a nil value)

openresty/1.15.8.1

zhuizhuhaomeng commented 2 years ago

got the following error, maybe you need to update you lua-resty-redis or upgrade openresty to 1.19.9.1

Error running script (call to f_e35dca329133b2e0872bde2ae06a1003e4642095): @enable_strict_lua:15: user_script:1: Script attempted to access nonexistent global variable 'PAGE_HASH_LIST'