Page Caching

1 view
Skip to first unread message

Sean

unread,
Jan 5, 2010, 2:15:25 PM1/5/10
to CFCDev
Im having problems with my coldfusion page caching. I am building a
login system that uses sessions to persist user data. the system works
as expected for the most part. There is a login page, logout page, and
protected pages. The login page works as expected. and the protected
pages redirect to the login page if a session.UserObject is not set.
There is also a logout function that clears the user object like
this:

<pre> <cflock scope="Session" type="Exclusive" timeout="20">
<cfset StructDelete(Session, "userObject")>
</cflock>
</pre>

after logout, if the user goes back to the login page, it displays the
form again because i check for the session user object, which no
longer exists. but if i go to the protected page, it shows the
protected content still! if i clear my cache and refresh, it hides the
protected content as intended. I dont get it because im using the same
check for session object on both pages, yet only one works as
intended.

can i force coldfusion to not cache this page? what am i doing wrong?

Judah McAuley

unread,
Jan 7, 2010, 5:00:46 PM1/7/10
to cfc...@googlegroups.com
This sounds like it might be client-side content caching if it goes
away when you clear your browser cache. Try setting http no-cache
headers on your protected pages and see if that clears up the issue.

Cheers,
Judah

> --
> You received this message because you are subscribed to the Google Groups "CFCDev" group.
> To post to this group, send email to cfc...@googlegroups.com.
> To unsubscribe from this group, send email to cfcdev+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/cfcdev?hl=en.
>
>
>
>

Reply all
Reply to author
Forward
0 new messages