-
Notifications
You must be signed in to change notification settings - Fork 6
Redis store
Redis is default datastore for ACLatraz. This awesome key-value database is extremaly fast and scalable. Authorization mechanisms like ACLatraz can generate very high load, but Redis can handle this perfectly.
Read this article on The Redis Cookbook - it should help you properly setup Redis server on your machine.
Now install the redis client for ruby. You can manage it easily from rubygems:
sudo gem install redis
If you want get to known more about Redis then you should visit its homepage.
There is few ways to initialize ACLatraz with Redis store:
-
the easiest way is to give url to redis database:
Aclatraz.init :redis, "redis://localhost:6379/0"
-
You can also give already configured redis connection as second parameter, eg.
my_redis = Redis.new(:url => "redis://localhost:6380/0") Aclatraz.init :redis, my_redis
-
or you can also give redis connection options as hash:
Aclatraz.init :redis, :url => "redis://localhost:6379/0", :thread_safe => true
Remember that you should specify dedicated Redis database only for ACLatraz!