This might be a silly question but I’d like to know what exactly is the difference between structClear(session) and the sessionInvalidate() function added in ColdFusion 10?
This might be a silly question but I’d like to know what exactly is
Share
According to Mister Dai, who has backported the SessionInvalidate function to previous versions, it performs more than just calling
StructClear, and also callsonSessionEndbefore this, andcoldfusion.runtime.sessionTracker.cleanupafterwards.Further details at: https://misterdai.yougeezer.co.uk/blog/project/2012-03-12/
Something that _neither_ of these methods do, which is worth being aware of, is that they do not invalidate the session if CF is set to “Use J2EE session variables” (since this is controlled by the underlying servlet engine, not by CF)