Created attachment 31793 [details] Add a flag to PersistentManager whether it will save idle sessions once or always The PersistentManager will save every Session which has not been accessed since maxIdleBackup time on every round. The attached patch will introduce a flag, so that the admin can decide whether he wants to have the old behaviour, or the more efficient one of only saving sessions once, when they were accessed and idle for maxIdleBackup. The patch gets a lot simpler, if we just change the behaviour and declare the old one as a bug :) Tomcat 7 has the same problem and I could provide a patch for it, too.
Lets go with the more efficient behaviour. I see no good reason to introduce yet another configuration option just to enable inefficient behaviour to continue. Can you provide the simpler patch?
Created attachment 31798 [details] Persist sessions only once while lastAccessedTime is not changed Simpler version of the previous patch. TestCase is included still.
Created attachment 31799 [details] Simple version of the patch for tomcat 7 Same functionality of the simpler patch for tomcat 7.
Thanks for the report and for the patches. This has been fixed in 8.0.x for 8.0.10 onwards and in 7.0.x for 7.0.55 onwards.