diff --git a/src/amber_cli/commands/new_command.cr b/src/amber_cli/commands/new_command.cr index da8195e..9f6c3b5 100644 --- a/src/amber_cli/commands/new_command.cr +++ b/src/amber_cli/commands/new_command.cr @@ -812,14 +812,18 @@ database: session: key: "#{name}.session" - # signed_cookie keeps the session in the visitor's cookie: tamper-proof, readable by - # the visitor, about 4 KB, and nothing is held on the server. encrypted_cookie also - # hides it from the visitor. adapter keeps sessions on the server through `adapter`. + # Amber 2.0.0-beta.11 keeps every session on the server, in `adapter`, whichever store + # is named here; the cookie carries only the encrypted session id. It accepts + # signed_cookie, encrypted_cookie and redis. Once amberframework/amber#1455 is + # released, signed_cookie and encrypted_cookie keep the session in the visitor's + # cookie with nothing held on the server, and store: adapter becomes valid. store: "signed_cookie" - # Used only when store is adapter: memory (at most 10,000 sessions per process) or redis. + # memory, or an adapter the app registers with Amber::Adapters::AdapterFactory. + # The memory adapter has no size limit in beta.11; amber#1455 caps it at + # session.max_memory_sessions (10,000 by default). adapter: "memory" - # Seconds a session lasts after its last change (two weeks). 0 makes cookie sessions - # end when the browser closes and lets server-side sessions live until evicted. + # Seconds a session lasts after its last change (two weeks). 0 makes the cookie end + # when the browser closes; a server-side session with 0 never expires. expires: 1209600 static: diff --git a/src/amber_cli/templates/app/config/environments/development.yml.ecr b/src/amber_cli/templates/app/config/environments/development.yml.ecr index 0b48222..9dc36a0 100644 --- a/src/amber_cli/templates/app/config/environments/development.yml.ecr +++ b/src/amber_cli/templates/app/config/environments/development.yml.ecr @@ -17,14 +17,18 @@ when "mysql" -%> session: key: <%= @name %>.session - # signed_cookie keeps the session in the visitor's cookie: tamper-proof, readable by - # the visitor, about 4 KB, and nothing is held on the server. encrypted_cookie also - # hides it from the visitor. adapter keeps sessions on the server through `adapter`. + # Amber 2.0.0-beta.11 keeps every session on the server, in `adapter`, whichever store + # is named here; the cookie carries only the encrypted session id. It accepts + # signed_cookie, encrypted_cookie and redis. Once amberframework/amber#1455 is + # released, signed_cookie and encrypted_cookie keep the session in the visitor's + # cookie with nothing held on the server, and store: adapter becomes valid. store: signed_cookie - # Used only when store is adapter: memory (at most 10,000 sessions per process) or redis. + # memory, or an adapter the app registers with Amber::Adapters::AdapterFactory. + # The memory adapter has no size limit in beta.11; amber#1455 caps it at + # session.max_memory_sessions (10,000 by default). adapter: memory - # Seconds a session lasts after its last change (two weeks). 0 makes cookie sessions - # end when the browser closes and lets server-side sessions live until evicted. + # Seconds a session lasts after its last change (two weeks). 0 makes the cookie end + # when the browser closes; a server-side session with 0 never expires. expires: 1209600 logging: diff --git a/src/amber_cli/templates/app/config/environments/production.yml.ecr b/src/amber_cli/templates/app/config/environments/production.yml.ecr index b394efc..4804b80 100644 --- a/src/amber_cli/templates/app/config/environments/production.yml.ecr +++ b/src/amber_cli/templates/app/config/environments/production.yml.ecr @@ -11,14 +11,18 @@ database: session: key: <%= @name %>.session - # signed_cookie keeps the session in the visitor's cookie: tamper-proof, readable by - # the visitor, about 4 KB, and nothing is held on the server. encrypted_cookie also - # hides it from the visitor. adapter keeps sessions on the server through `adapter`. + # Amber 2.0.0-beta.11 keeps every session on the server, in `adapter`, whichever store + # is named here; the cookie carries only the encrypted session id. It accepts + # signed_cookie, encrypted_cookie and redis. Once amberframework/amber#1455 is + # released, signed_cookie and encrypted_cookie keep the session in the visitor's + # cookie with nothing held on the server, and store: adapter becomes valid. store: signed_cookie - # Used only when store is adapter: memory (at most 10,000 sessions per process) or redis. + # memory, or an adapter the app registers with Amber::Adapters::AdapterFactory. + # The memory adapter has no size limit in beta.11; amber#1455 caps it at + # session.max_memory_sessions (10,000 by default). adapter: memory - # Seconds a session lasts after its last change (two weeks). 0 makes cookie sessions - # end when the browser closes and lets server-side sessions live until evicted. + # Seconds a session lasts after its last change (two weeks). 0 makes the cookie end + # when the browser closes; a server-side session with 0 never expires. expires: 1209600 logging: diff --git a/src/amber_cli/templates/app/config/environments/test.yml.ecr b/src/amber_cli/templates/app/config/environments/test.yml.ecr index 3a70ef7..47141c0 100644 --- a/src/amber_cli/templates/app/config/environments/test.yml.ecr +++ b/src/amber_cli/templates/app/config/environments/test.yml.ecr @@ -17,14 +17,18 @@ when "mysql" -%> session: key: <%= @name %>.session - # signed_cookie keeps the session in the visitor's cookie: tamper-proof, readable by - # the visitor, about 4 KB, and nothing is held on the server. encrypted_cookie also - # hides it from the visitor. adapter keeps sessions on the server through `adapter`. + # Amber 2.0.0-beta.11 keeps every session on the server, in `adapter`, whichever store + # is named here; the cookie carries only the encrypted session id. It accepts + # signed_cookie, encrypted_cookie and redis. Once amberframework/amber#1455 is + # released, signed_cookie and encrypted_cookie keep the session in the visitor's + # cookie with nothing held on the server, and store: adapter becomes valid. store: signed_cookie - # Used only when store is adapter: memory (at most 10,000 sessions per process) or redis. + # memory, or an adapter the app registers with Amber::Adapters::AdapterFactory. + # The memory adapter has no size limit in beta.11; amber#1455 caps it at + # session.max_memory_sessions (10,000 by default). adapter: memory - # Seconds a session lasts after its last change (two weeks). 0 makes cookie sessions - # end when the browser closes and lets server-side sessions live until evicted. + # Seconds a session lasts after its last change (two weeks). 0 makes the cookie end + # when the browser closes; a server-side session with 0 never expires. expires: 1209600 logging: