forum

Home / DeveloperSection / Forums / Servlet session attribute size and lifetime

Servlet session attribute size and lifetime

Anonymous User193103-Dec-2015
1) What is an acceptable size range of objects that should be attached to a session? If I attach an object that can be 5k, and I have 10k valid sessions at any given time, that's 50MB of memory which seems acceptable to me. Is that a valid way to approach the issue, or are there other significant concerns?

2) This is probably a dumb question, but if I attach an object to a session with a 2 week lifetime, can I access the attribute as though it were in memory for the whole duration of the session?

3) Is there any reason NOT to always persist session information to a DB?

Updated on 03-Dec-2015
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By