Use memcache to store temporary OpenID data

OpenID nonces and associations need to be visible across all the
servers in the production cluster, so store them in memcache where
everything can see them properly.
This commit is contained in:
Tom Hughes 2012-05-09 10:14:58 +01:00
parent 7ffc0be014
commit f89dda9b90

View file

@ -1 +1,7 @@
if defined?(MEMCACHE_SERVERS)
require "openid/store/memcache"
OpenIdAuthentication.store = OpenID::Store::Memcache.new(MemCache.new(:namespace => "rails", :string_return_types => true))
else
OpenIdAuthentication.store = :file OpenIdAuthentication.store = :file
end