spring-projects / spring-projects/spring-session

Improve caching of `requestedSession`

Open
#3,063 0 comments 0 reactions 1 assignee View on GitHub

@marcusdacoregio is already working on this.

Since Jun 25, 2024.

in: core type: enhancement
Dominant language
Java
Stars
1.9k
Forks
1.2k
Avg merge
4h 27m
Merged PRs (30d)
55

Description

As of now, the requestedSession is cached as a field in the request wrapper.

The majority of servlet containers recycle their request objects and return them to the pool for reuse. Since the requestedSession is stored in the wrapper level (not as an request attribute like currentSession), it won't be recycled.
We should improve this in a way that when the request is recycled, the requestedSession is also "cleared".

Thanks @swendlandt for the help identifying this improvement.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.