Page Caching, MVCC, Postgresql
From: Google Mike (googlemike_at_hotpop.com)
Date: 07/30/04
- Next message: Drazen Gemic: "Re: Application Object Replacement"
- Previous message: deko: "Re: Re: How to validate basic html form?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Jul 2004 08:15:42 -0700
I had a problem today where I had an editor page (edit2.php) that
posted data to PostgreSQL, and then a view page (view.php) that read
it in and displayed it. At first I thought this was an MVCC issue in
PostgreSQL because it was not displaying the latest changes, but the
second-to-latest changes. The end user was using IE 5, so he saw the
problem, but I was using Mozilla in RH9 Linux, so I never saw the
problem. Turns out it had nothing to do with MVCC feature in
PostgreSQL.
I resolved the problem by adding this in my banner.php that loads with
a require() at the top of my HTML in order to display a banner on each
page.
if ($nocache_page) {
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the
past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
}
and on pages where I needed to ensure no cache was used, I implemented
this feature by simply putting
$nocache_page = TRUE;
in it before banner.php was called.
By using the condition check, it permits me to have some pages to
cache and other pages to not.
- Next message: Drazen Gemic: "Re: Application Object Replacement"
- Previous message: deko: "Re: Re: How to validate basic html form?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|