Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit the size of usage of the session store to ~1KB #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

isaacseymour
Copy link

Very approximate (using the inspected array size as an estimate of the resulting cookie size), but bounds the cookie usage to leave about 75% for
other things.

Very approximate, but bounds the cookie usage to leave about 75% for
other things.
@@ -6,18 +6,21 @@ def initialize(session, module_key, initial_list=nil)
@session = session
@module_key = module_key
@session_key = ('analytical_'+module_key.to_s).to_sym
ensure_session_setup!(initial_list)
assign(initial_list || [])
end

def assign(v)
self.commands = v

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't this call trim_commands! given we define commands=?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants