openstreetmap-website/config/initializers/openid.rb
Tom Hughes f89dda9b90 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.
2012-05-09 10:14:58 +01:00

7 lines
237 B
Ruby

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
end