Fixed that MemCacheStore wasn't included by default and added default MemCache...

Fixed that MemCacheStore wasn't included by default and added default MemCache object pointing to localhost #447 [Lucas Carlson]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@384 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 98c16a33
*SVN*
* Fixed that MemCacheStore wasn't included by default and added default MemCache object pointing to localhost #447 [Lucas Carlson]
* Added fourth argument to render_collection_of_partials that allows you to specify local_assigns -- just like render_partial #432 [zenspider]
* Fixed that host would choke when cgi.host returned nil #432 [Tobias Luetke]
......
......@@ -2,6 +2,7 @@
require 'action_controller/cgi_ext/cookie_performance_fix'
require 'action_controller/session/drb_store'
require 'action_controller/session/active_record_store'
require 'action_controller/session/mem_cache_store'
module ActionController #:nodoc:
class Base
......
......@@ -46,7 +46,7 @@ def initialize(session, options = {})
unless check_id(id)
raise ArgumentError, "session_id '%s' is invalid" % id
end
@cache = options['cache']
@cache = options['cache'] || MemCache.new('localhost')
@session_key = "session:#{id}"
@hash = {}
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册