I’ve been struggling with this too, Lucee 22.214.171.124.
In my case I would like to grant some users a whole day session but all the rest quite a short timeout.
No matter what I’ve tried, I don’t seem to be able to change it from
this.sessionTimeout = CreateTimeSpan(0, 1, 0, 0);
which is my default at the moment.
GetPageContext().getSession().setMaxInactiveInterval( 14400 );
but this doesn’t seem to change anything in getApplicationMetadata() - but perhaps I’m looking in the wrong place?
I accept that Ben Nadel’s solution probably works, but I don’t want to have to have a special url variable on every page for the long-session users. With the idea that it might be possible to actually have swapable timeouts stored as a session variable which could be altered once the user had logged in, I tried this, the new session.customTimeout value is written to session, but nothing seems to be changing in getApplicationMetadata()
this.sessionManagement = true;
cfparam(name="session.customTimeout" default = CreateTimeSpan(0, 1, 0, 0));
this.sessionTimeout = session.customTimeout;
Any other ideas?