ileitch/rapns — pull request #154 by stevesng (2013-08-16 10:17:42+00:00)
Title: Redis store implementation

An alternative store which implements all of ActiveRecord store's interface.

To use this Redis store, add/uncomment these in initializers/rapns.rb:

require 'connection_pool'
require 'rapns/daemon/store/redis_store'
Rapns::Notification.send(:include, Rapns::NotificationAsRedisObject)

Rapns.configure do |config|
...
config.store = :redis_store
config.redis_host = "localhost"
config.redis_port = 6379
config.number_of_connections = 5
config.connection_timeout = 1
config.stalled_notification_tolerence = 3600
...
end

To save a notification for sending:
notification.save_to_redis