Re: Caching Problem
| From: | Paul A. Procacci | Date: | Thu, 07 Mar 2002 01:42:52 +0000 |
| Subject: | Re: Caching Problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-87585@lists.php.net to get a copy of this message | ||
Hah,
I found the problem. It's because vmstat when called always, initially has the cpu idle at 99. This explains it. So, how would I go abouts returning used cpu time on a system?
Thanks,
Paul
Paul A. Procacci wrote:
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