-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reuse cached session in MRU order, not in LRU
MRU is more server friendly than LRU because it reduces number of cached sessions when a number of requests drops after an usaage spike. Closes #68. With reusing sessions in LRU order, all sessions are equally checked if it's closed or not, as far as there's a request to the same site. With reusing sessions in MRU order, old cold sessions are kept in cache long time even if there's a request to the same site. To avoid this leakage, this commit adds keep_alive_timeout property and let SessionManager scrub all sessions with checking the timeout for each session. When the session expires against the last used time, it's closed and collected. keep_alive_timeout is 15[sec] by default. The value is from the default value for KeepAliveTimeout of Apache httpd 2. This change is related to #56.
- Loading branch information
Hiroshi Nakamura
committed
Oct 13, 2011
1 parent
3f84cd9
commit 08ec3ad
Showing
2 changed files
with
12 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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