This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
commit 67e708f9a83aaa1ed17b6b2e55a52003b8b3ac5e
tree 9541524cca06700e690f16b770d28ccc56925c06
parent b70ac9a6844c3535c91db4f74e8cbfb9b7eb16e3
tree 9541524cca06700e690f16b770d28ccc56925c06
parent b70ac9a6844c3535c91db4f74e8cbfb9b7eb16e3
| name | age | message | |
|---|---|---|---|
| |
LICENSE | ||
| |
README | ||
| |
Rakefile | Wed Oct 08 07:26:13 -0700 2008 | |
| |
init.rb | ||
| |
install.rb | ||
| |
lib/ | ||
| |
tasks/ | Tue May 01 08:08:44 -0700 2007 | |
| |
test/ |
README
== SmartSessionStore A session store that avoids the pitfalls usually associated with concurrent access to the session (see http://about.82ask.com/2007/05/01/race-conditions-in-rails-sessions-and-how-to-fix-them/) Derived from SqlSessionStore, see http://railsexpress.de/blog/articles/2005/12/19/roll-your-own-sql-session-store == Step 1 Generate your sessions table using rake db:sessions:create == Step 2 Add the code below after the initializer config section: ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS. update(:database_manager => SmartSessionStore) Finally, depending on your database type, add SmartSessionStore.session_class = MysqlSession or SmartSessionStore.session_class = PostgresqlSession or SmartSessionStore.session_class = OracleSession after the initializer section in environment.rb == Step 3 (optional) If you want to use a database separate from your default one to store your sessions, specify a configuration in your database.yml file (say sessions), and establish the connection on SqlSession in environment.rb: SqlSession.establish_connection :sessions == IMPORTANT NOTES 1. You will need the binary drivers for Mysql or Postgresql. These have been verified to work: * ruby-postgres (0.7.1.2005.12.21) with postgreql 8.1 * ruby-mysql 2.7.1 with Mysql 4.1 * ruby-mysql 2.7.2 with Mysql 5.0 2. Tests have been done with SqlLiteSession, SqlSession and MysqlSession. I don't have access to Oracle or Postgresql and so have not been able to test those. Feedback would be very much appreciated








