Welcome Guest, Not a member yet? Register   Sign In
really really really bad caching
#1

[eluser]mrhappystein[/eluser]
hi everyone! im working on a site right now and im at the login part. my problem is that when someone logs in, all the other pages are cached. they are cached so badly that i have to go into the source in firefox and refresh a bunch of times til the navigation changes. i set one session value and when the user clicks logout i destroy the session. ive gone as far as to set the session back to 0 then delete it but still nothing works. at first i thought it might have been a sub folder issue because my index is running wp. i moved it over to another domain and am still getting the issue. i can post code and what not, i just dont know what to post right now. does anyone have any suggestions? if not, ill have to move to a different framework and i really really dont want to. thanks in advance!!!
#2

[eluser]n0xie[/eluser]
Did you disable the cache in your browser?
#3

[eluser]mrhappystein[/eluser]
good point! haha. i didn't think about that. but then i ask the question, what happens when i go live?
#4

[eluser]Mike DeFelice[/eluser]
Can you explain what is happening a little bit more? Are you caching using CI's cache and that's the issue?
#5

[eluser]mrhappystein[/eluser]
hi...sorry about any confusion. the problem is that ci is the default install of ci is caching ridiculously hard. i have another site where i use it and its working fine -- last time i checked. whats happening to me is im at the beginning stages of a user login. ive set up my username and password and all that works beautifully. however, when im logged in, the navigation is supposed to change. i click the logout link which destroys the session. it redirects me to the index -- for now -- and it still shows me as logged in. since the logout page is a redirect(), right now, i send it back to the homepage. when i get to the homepage, it still shows me as logged in. if i go to a different page on the site such as register or about us, depending if theyre already logged in, its still cached. i recently moved my wp blog to my root domain and after i started seeing these issues -- even though my other ci subdomain is still working fine. ive googled all over the place and cant find what i need which is why im posting here. im using the whole shared hosting with doteasy thing. when the user clicks logout, it unsets their is_logged_in session. ive tried unsetting it and then resetting it to 0. ive taken my templates and starting echoing time() to try to get them to refresh properly. they refresh the time() fine but still it doesnt show the user logged out or in. i can post some code, but i just have to know which mvc youre looking to see. appreciate the patience.
#6

[eluser]Mike DeFelice[/eluser]
This is understandable, are you using any of CI's built in cache functions such as

Code:
$this->output->cache(n);


sorry for all the questions, just trying to get a feel of what is happening, versus what has happened to me in the past.




Theme © iAndrew 2016 - Forum software by © MyBB