Skip to content

Commit ee69b84

Browse files
committed
mention namespace options in the readme
1 parent 81a5cc2 commit ee69b84

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

README.markdown

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ can re-use the existing connection.
609609

610610
String: `Resque.redis = 'localhost:6379'`
611611

612-
Redis: `Redus.redis = $redis`
612+
Redis: `Resque.redis = $redis`
613613

614614
For our rails app we have a `config/initializers/resque.rb` file where
615615
we load `config/resque.yml` by hand and set the Redis information
@@ -639,6 +639,25 @@ this way we can tell our Sinatra app about the config file:
639639
Now everyone is on the same page.
640640

641641

642+
Namespaces
643+
----------
644+
645+
If you're running multiple, separate instances of Resque you may want
646+
to namespace the keyspaces so they do not overlap. This is not unlike
647+
the approach taken by many memcached clients.
648+
649+
This feature is provided by the [redis-namespace][rs] library, which
650+
Resque uses by default to separate the keys it manages from other keys
651+
in your Redis server.
652+
653+
Simply use the `Resque.redis.namespace` accessor:
654+
655+
Resque.redis.namespace = "resque:GitHub"
656+
657+
We recommend sticking this in your initializer somewhere after Redis
658+
is configured.
659+
660+
642661
Demo
643662
----
644663

@@ -734,3 +753,4 @@ Chris Wanstrath :: [email protected] :: @defunkt
734753
[1]: http://help.github.com/forking/
735754
[2]: http://github.com/defunkt/resque/issues
736755
[sv]: http://semver.org/
756+
[rs]: http://github.com/defunkt/redis-namespace

0 commit comments

Comments
 (0)