Caching Problem
| From: | Paul A. Procacci | Date: | Thu, 07 Mar 2002 01:35:08 +0000 |
| Subject: | Caching Problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-87584@lists.php.net to get a copy of this message | ||
Hey all,
I'm trying not to cache a page. I have the following code:
$return = split(" ", exec("vmstat"));
$cpu_top = 100;
$return = $cpu_top - $return[count($return) -1];
which returns the amount of idle cpu time. The problem is this, every time the page is loaded, it always show the first value when the page was first loaded. I tried adding :
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
all randomly, and together, but nothing seems to work. I can run one of my binaries in a forever loop causing the cpu not ever to be idle, but still nothing. Help?
Thanks in advance,
Paul