Skip to content

Commit

Permalink
[JENKINS-49596] session cache is never cleaned
Browse files Browse the repository at this point in the history
Signed-off-by: olivier lamy <olamy@apache.org>
  • Loading branch information
olamy committed Feb 20, 2018
1 parent 4e556fc commit 36ab8d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/java/winstone/HostConfiguration.java
Expand Up @@ -173,8 +173,11 @@ public void postConfigure() throws Exception {

// if specified, override the value in web.xml
int sessionTimeout = Option.SESSION_TIMEOUT.get(args);
if (sessionTimeout>0)
if (sessionTimeout>0) {
getSessionHandler().setMaxInactiveInterval(sessionTimeout * 60);
}
int sessionEviction = Option.SESSION_EVICTION.get(args);
getSessionHandler().getSessionCache().setEvictionPolicy( sessionEviction );
}
};
wac.getSecurityHandler().setLoginService(loginService);
Expand Down
1 change: 1 addition & 0 deletions src/java/winstone/cmdline/Option.java
Expand Up @@ -97,6 +97,7 @@ public static List<Option<?>> all(Class<?> clazz) {
public static final OInt MAX_PARAM_COUNT=integer("maxParamCount",-1);
public static final OBoolean USAGE=bool("usage",false);
public static final OInt SESSION_TIMEOUT=integer("sessionTimeout",-1);
public static final OInt SESSION_EVICTION=integer("sessionEviction",180);
public static final OInt REQUEST_HEADER_SIZE=integer("requestHeaderSize",8192); // default for jetty 9
public static final OInt REQUEST_FORM_CONTENT_SIZE=integer("requestFormContentSize",-1); // no limit (compat with old winstone)
public static final OBoolean HELP=bool("help",false);
Expand Down

1 comment on commit 36ab8d1

@oleg-nenashev
Copy link
Member

Choose a reason for hiding this comment

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

will release it tomorrow

Please sign in to comment.