Repository navigation
Correct the generated session comments - #59
Merged
Merged
Conversation
The generated environment files said that store: signed_cookie keeps nothing on the server and that the memory adapter holds at most 10,000 sessions per process. Amber 2.0.0-beta.11, which generated apps pin, does neither: it keeps every session in the memory adapter whatever store says, the memory adapter has no size limit, and store: adapter fails validation. A session with expires: 0 is never removed either. The comments now describe beta.11 as it is and name amberframework/amber#1455, which makes cookie stores keep nothing on the server, accepts store: adapter, and caps the memory adapter at session.max_memory_sessions (10,000 by default).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
The
sessioncomments in every generated environment file (and the minimal configamber newwrites fromnew_command.cr) promised two things Amber 2.0.0-beta.11, the release generated apps pin, does not do:Session::Store#buildignoresstoreand keeps every session in the memory adapter.MemorySessionAdapterhas no size limit.They also offered
store: adapter, which beta.11'sSessionConfig#validate!rejects, and said a session withexpires: 0lives "until evicted", though nothing evicts it.What changes
The comments describe beta.11 as it behaves and point to amberframework/amber#1455, which makes the cookie stores keep nothing on the server, accepts
store: adapter, and caps the memory adapter atsession.max_memory_sessions(10,000 by default). The settings themselves are unchanged.Once #1455 is released and the template pins that release, the comments can drop the beta.11 wording.