You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -375,6 +377,20 @@ A sample config snippet looks like this
375
377
376
378
[Back to TOC](#table-of-contents)
377
379
380
+
Selecting Redis Databases
381
+
=========================
382
+
383
+
Redis provides the [select](http://redis.io/commands/SELECT) command to switch Redis databaess. This command is no different from other normal commands
384
+
like [get](http://redis.io/commands/GET) or [set](http://redis.io/commands/SET). So you can use them in [redis2_query](#redis2_query) directives, for
385
+
example,
386
+
387
+
```nginx
388
+
redis2_query select 8;
389
+
redis2_query get foo;
390
+
```
391
+
392
+
[Back to TOC](#table-of-contents)
393
+
378
394
Lua Interoperability
379
395
====================
380
396
@@ -741,3 +757,5 @@ SEE ALSO
741
757
* The [ngx_openresty bundle](http://openresty.org).
742
758
* The [lua-resty-redis](https://github.com/openresty/lua-resty-redis) library based on the [lua-nginx-module](http://github.com/openresty/lua-nginx-module) cosocket API.
0 commit comments