How Can I Stop Page Cache

hi all,

In my site’s CMS, admin can edit certain things and save to database, but admin click around the site and come back to the edit page again, it still shows old data.

Can only see those changes after refresh the whole page.

Any idea how I can solve this problem? CMS shall always have the fresh data getting right from database, right?

Many thanks.

Hi CullenSUN

Do you use any cache implementation?

You said "come back to edit page", directly after of submit? Did you change any crucial code of your model/view/controller?

Hi I didn’t use any of Yii’s Cache, as I haven’t come to that stage yet.

I think my problem is the browser cache, and it is really annoying. But I do realize that Yii’s Model’s default view always show the instant data from database/


header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1

header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past


this code solved my problem like a charm