<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/open_id_authentication/mem_cache_store.rb</filename>
    </added>
    <added>
      <filename>test/mem_cache_store_test.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,7 +1,10 @@
 require 'uri'
 require 'openid/extensions/sreg'
 require 'openid/store/filesystem'
-require File.join(File.dirname(__FILE__), 'open_id_authentication/timeout_fixes') if OpenID::VERSION == &quot;2.0.4&quot;
+
+require File.dirname(__FILE__) + '/open_id_authentication/db_store'
+require File.dirname(__FILE__) + '/open_id_authentication/mem_cache_store'
+require File.dirname(__FILE__) + '/open_id_authentication/timeout_fixes' if OpenID::VERSION == &quot;2.0.4&quot;
 
 module OpenIdAuthentication
   OPEN_ID_AUTHENTICATION_DIR = RAILS_ROOT + &quot;/tmp/openids&quot;
@@ -10,8 +13,19 @@ module OpenIdAuthentication
     @@store
   end
 
-  def self.store=(value)
-    @@store = value
+  def self.store=(*store_option)
+    store, *parameters = *([ store_option ].flatten)
+
+    @@store = case store
+    when :db
+      OpenIdAuthentication::DbStore.new
+    when :mem_cache
+      OpenIdAuthentication::MemCacheStore.new(*parameters)
+    when :file
+      OpenID::Store::Filesystem.new(OPEN_ID_AUTHENTICATION_DIR)
+    else
+      raise &quot;Unknown store: #{store}&quot;
+    end
   end
 
   self.store = :db
@@ -123,17 +137,6 @@ module OpenIdAuthentication
       OpenID::Consumer.new(session, open_id_store)
     end
 
-    def open_id_store
-      case store
-      when :db
-        OpenIdAuthentication::DbStore.new
-      when :file
-        OpenID::FilesystemStore.new(OPEN_ID_AUTHENTICATION_DIR)
-      else
-        raise &quot;Unknown store: #{store}&quot;
-      end
-    end
-
     def add_simple_registration_fields(open_id_request, fields)
       sreg_request = OpenID::SReg::Request.new
       sreg_request.request_fields(Array(fields[:required]).map(&amp;:to_s), true) if fields[:required]</diff>
      <filename>lib/open_id_authentication.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f6f7eacc984f921e49729ae4136fa96dd8580388</id>
    </parent>
  </parents>
  <author>
    <name>Joshua Peek</name>
    <email>josh@joshpeek.com</email>
  </author>
  <url>http://github.com/technoweenie/open_id_authentication/commit/2a6401b28000499bd38d9326b77d4087b4d653bd</url>
  <id>2a6401b28000499bd38d9326b77d4087b4d653bd</id>
  <committed-date>2008-05-12T12:36:10-07:00</committed-date>
  <authored-date>2008-05-12T12:36:10-07:00</authored-date>
  <message>Added MemCacheStore option.</message>
  <tree>6911af98f2a2b121093d37ae9afac603784b9950</tree>
  <committer>
    <name>Joshua Peek</name>
    <email>josh@joshpeek.com</email>
  </committer>
</commit>
