ColdFusion cfcache clientcache flush

I created a web application with this script surrounding the usual cfqueries and my navigation code.

<cfcache action="clientcache" timespan="#createtimespan(0,1,0,0)#">

      

In the output page, I used <cfset StructClear(Session)>

to clear the session data. I want to also clear the cache and use <cfcache action="flush">

.

However, something is not working and the session is not cleared and the clients cannot exit the application. When I remove the cfcache tag, clients can log out, but the system moves incredibly slowly.

How can I work correctly with the cfcache tag? Thanks in advance.

+3


source to share


1 answer


Deleting a session does not end the session, it just clears out the variables in the session scope. Session scope is something that was useful for a session, but does not actually represent a session.



You probably want to use sessionInvalidate()

to invalidate the session. I have not tested this in conjunction with session based caching, but I suppose it rotates cookies CFID

and CFTOKEN

therefore should do the trick with any client stuff. Note the docs saying that it only works with CF sessions, not J2EE. This may or may not be for you.

+3


source







All Articles