Infinite loop script cache behaviour
<p>I have a domain.com which is working perfectly. I have a php script in my domain which is infinite loop which is sleeping with doubled periods (for long polling purposes) lets say infinite.php. </p>

<pre><code>$sleepDuration = 1;
while(true) {
  //check database
  // do some stuff 
 if(some new result) {
    return jsonresult
  } else {
    $sleepDuration *= 2;
    sleep($sleepDuration)
    continue;
  }
}
</code></pre>

<p>If I execute this script via browser (for test purposes or w/e) with url domain.com/infinite (I use htaccess to remove .php extension in url) this file gets cached and here is the most annoying thing: from this point on domain.com will not respond to browser. Webpage will not open from now on. (I have to clear all my cached files to make it work again).</p>

<ol>
<li>How can I prevent caching of such php files ?</li>
<li>Is there anyway I can remove only this version of php file from the cache ?</li>
</ol>

<p>P.s: I know it is absurd to execute this script from browser but as I said I would like to learn and manipulate the caching of such files.</p>