Record not saved immediately in production mode

I've been developing a rails application in development mode for a few
weeks, and the backend database logic was working well. Now I'm
switching to a shared host (, and tried to run in
production mode, just to find that the behaviour is so different from
development mode, and I'm facing serious problem.

The most crucial difference is in database. In development mode, every
change in database record takes effect immediately when the record is
saved. Say I changed a comment from "Hello world!" to "Hello!", then
next time I query this comment, I'll get "Hello!", not "Hello

But in production mode in the shared host, what I'm getting is "Hello
world!" even after I saved this record. This behaviour is really
undesirable, since the application relies on real-time data. I'm
guessing that in shared host, they optimized the database query so
that it's cached somehow.

Could anybody point out why this is happening? And how to disable the
caching of database query in production mode? Or any suggestions?

Dongzhen Piao.

It would help to see some code. In development mode your whole app is
reloaded between requests, which can mask some issues.