diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-05-15 00:08:05 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-05-15 00:08:05 +0000 |
commit | f8273e430916f8c7b0d21ad14aab90e427f8c0a6 (patch) | |
tree | 4dfec8ec427d1c1d3b2fc98184790a95f5ff7919 /actionpack/lib/action_controller/cgi_ext/pstore_performance_fix.rb | |
parent | 7fb5d44df77c377a02797d0dbdddbf6817d55ce8 (diff) | |
download | rails-f8273e430916f8c7b0d21ad14aab90e427f8c0a6.tar.gz rails-f8273e430916f8c7b0d21ad14aab90e427f8c0a6.tar.bz2 rails-f8273e430916f8c7b0d21ad14aab90e427f8c0a6.zip |
Shine some sunlight on the CGI extensions. Remove unused CGI#session.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6733 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/cgi_ext/pstore_performance_fix.rb')
-rw-r--r-- | actionpack/lib/action_controller/cgi_ext/pstore_performance_fix.rb | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/actionpack/lib/action_controller/cgi_ext/pstore_performance_fix.rb b/actionpack/lib/action_controller/cgi_ext/pstore_performance_fix.rb deleted file mode 100644 index 79e427a350..0000000000 --- a/actionpack/lib/action_controller/cgi_ext/pstore_performance_fix.rb +++ /dev/null @@ -1,30 +0,0 @@ -# CGI::Session::PStore.initialize requires 'digest/md5' on every call. -# This makes sense when spawning processes per request, but is -# unnecessarily expensive when serving requests from a long-lived -# process. -require 'cgi/session' -require 'cgi/session/pstore' -require 'digest/md5' - -class CGI::Session::PStore #:nodoc: - def initialize(session, option={}) - dir = option['tmpdir'] || Dir::tmpdir - prefix = option['prefix'] || '' - id = session.session_id - md5 = Digest::MD5.hexdigest(id)[0,16] - path = dir+"/"+prefix+md5 - path.untaint - if File::exist?(path) - @hash = nil - else - unless session.new_session - raise CGI::Session::NoSession, "uninitialized session" - end - @hash = {} - end - @p = ::PStore.new(path) - @p.transaction do |p| - File.chmod(0600, p.path) - end - end -end |