heroku/heroku-kong

using redis

jney opened this issue · 1 comments

jney commented

I'd like to use resty.redis in a plugin, but i got an error see openresty/lua-resty-redis#89
but i can't figure out where it comes from. do you guys have any experience using redis ?

mars commented

Based on the responses to the issue you linked @jney, this is caused by trying to access Redis in an unsupported Nginx context, e.g. init_by_lua*.

I definitely experienced these limitations of the init phase too, but with Postgres instead of Redis (years ago now).

The LuaSockets alternative is a good one, but not useful if you're simply trying to use an existing library like resty.redis that doesn't already implement that low-level, alternative interface.