clues to cache-like behavior
clues to cache-like behavior
am 09.08.2011 05:09:39 von dbrooke
Hello,
I took some PHP/MySQL code that seemed to be working fine from a LAMP
setup and brought it to a MAMP (mac OS) setup. Now I am seeing a
cache-like behavior in my admin forms, where my last changes don't "stick".
To be clearer, I go to make a database change in the forms I built to
administer the MySQL db, hit submit, then check the results on the
public side. All is fine at this point. The changes are there. However,
I decide to adjust something and go to make another edit, however, my
admin form shows the prior data.. not the last edits.
Checking via command-line the edits are there, and if in and out of the
edit page a few times, the last edits finally appear.
Anyway, I've only built a couple MySQL driven sites so far, and haven't
gotten all the way through my O'reilly MySQL book yet, but I thought I'd
see if this kind of thing rang a bell with anyone.
If I had to make a blind guess, I'd guess a config issue (either PHP or
MySQL), as I don't remember this behavior in the LAMP setup.
TIA for your comments.
Donovan
--
D Brooke
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: clues to cache-like behavior
am 09.08.2011 15:10:28 von Jim Giner
So you're saying a page refresh in your browser doesn't cure the problem?
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: clues to cache-like behavior
am 10.08.2011 06:38:15 von dbrooke
Jim Giner wrote:
> So you're saying a page refresh in your browser doesn't cure the problem?
Hi, sorry for the delay.. Yes, page refresh/s is basically what I am
doing to get to the latest edits (by clicking in and out of the edit
area). Reloading the page one or more times works as well.
Donovan
--
D Brooke
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: clues to cache-like behavior
am 10.08.2011 14:20:17 von Jim Giner
With IE, a refresh is F5 or even better, ctrl-F5. Should always get the
latest updates. Or you could add:
header("Cache-Control: no-cache");
at the beginning of your php code.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: clues to cache-like behavior
am 10.08.2011 16:57:07 von dbrooke
Jim Giner wrote:
> With IE, a refresh is F5 or even better, ctrl-F5. Should always get the
> latest updates. Or you could add:
>
> header("Cache-Control: no-cache");
>
> at the beginning of your php code.
Well, that works! :-/ (I'm embarrassed to say)
For some reason I over-thought that one.
Thx,
Donovan
--
D Brooke
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re: clues to cache-like behavior
am 10.08.2011 17:30:15 von Jim Giner
HTH!
One thing - you should remove it after doing your development so that users
can take advantage of caching on their systems.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php