Database is cached?


#1

It appears that my database is cached.
If I have a simple action which displays all records in a table it works
fine, but if I then change one of the fields in the database using a
MySQL GUI it is not reflected when I press refresh in the browser. Even
if I clear the cache.
The actual view is not being cached anyway becasue if I add some text to
the view it is shown on refresh!

Is this normal or is something playing up?


#2

pete wrote:

It appears that my database is cached.
If I have a simple action which displays all records in a table it works
fine, but if I then change one of the fields in the database using a
MySQL GUI it is not reflected when I press refresh in the browser. Even
if I clear the cache.
The actual view is not being cached anyway becasue if I add some text to
the view it is shown on refresh!

Is this normal or is something playing up?

Are you storing the item you’re checking for updates in the session?
That would be a sure way to pull your hair out looking for changes when
you won’t get any.


#3

if you are not in development mode, you have to restart your web-server

also, I assume that your code is generic and should display all the
columns


#4

Kris wrote:

No they are not in the session, its a direct database call, normal
scaffold.

“if you are not in development mode, you have to restart your
web-server”

I’m in development mode.

??

I used MySQL Front for a while before realising that you have to press
the little green tick button to make sure the tables are updating after
edits. Anything like that?


#5

Daniel L. wrote:

Kris wrote:

No they are not in the session, its a direct database call, normal
scaffold.

“if you are not in development mode, you have to restart your
web-server”

I’m in development mode.

??

I used MySQL Front for a while before realising that you have to press
the little green tick button to make sure the tables are updating after
edits. Anything like that?

I dont think so, I use SQLyog and have done for a while now.
Maybe I give it a few days and see if the problem goes…


#6

So, are you changing the table structure (adding/renaming fields) and
then trying to see a difference in like a scaffold edit or new page?
Those fields are pulled out of the database when you generate your
scaffold, and they won’t automatically update if you change your
underlying structure.


#7

No they are not in the session, its a direct database call, normal
scaffold.

“if you are not in development mode, you have to restart your
web-server”

I’m in development mode.

??