Introduction:
We will know about the session timeout management in ColdFusion.
Use Cases:
Case : 1
In CF Admin Under Server Setting >> Memory Variables
The session timeout value was set to 30 mins
In My Application inside Application.cfc
The session timeout value was set to 20 mins
Case : 2
In CF Admin Under Server Setting >> Memory Variables
The session timeout value was set to 20 mins
In My Application inside Application.cfc
The session timeout value was set to 30 mins.
In the above 2 cases what would be the precendence of the session timeout values??
Answer:
case : 1 - session timeout value would be 20 minutes
case : 2 - session timeout value would be 30 minutes
Hence in both the cases the session timeout setting in CF Admin would be overwritten by the session timeout setting provided inside Application.cfc in the Application.
So it is a good habit to set the Memory variables inside the Application.cfc for an Application.
Using the code:
<cfapplication
name = "My Application"
sessionmanagement = "true"
sessiontimeout = "#CreateTimeSpan(0,1,0,0)#"
applicationtimeout = "#CreateTimeSpan(0,12,0,0)#">
The above code in Application.cfc will et the session timeout to 1 hour and the application timeout to 12 hours.(overriding the session and application timeout values those are set in CF Admin)
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.