The lastModified timestamp does not change however many times I refresh the page and update a session value. Plus, the hit count is off by -1. I strongly suspect Lucee may be still storing session data in memory. I am able to writeDump(session) and all is there as expected in the CFML app, with an incremented hit count that is accurate.
Two things. Firstly, Lucee does store the session data in memory in addition to the cache, but the memory is set to time out very quickly. It’s mostly just keep from going back to the cache for every hit. Secondly, do you have this.sessionCluster set to true? I’m not sure that it would create the scenario you describe, but I’m just curious if it’s affecting it.
We’re currently on version 4.5.5.006 and I believe it’s been happening for quite awhile. I’m not certain when it first started. I know the session clustering worked with Memcached when we initially deployed the application on Railo in 2014.
I’ve also tested with the Redis extension and it didn’t make a difference.
In App CFC, we’re setting this.sessionCluster = true.
If the user stays on the same server, the session is persisted, however, as soon as you hit a different backend, the session is lost.