Re: caching problem



Bruno wrote:
Hello Richard

Thanks for your answer!
Can I programm it within HTML to read from Cache or from the Server first?

Thanks

Bruno

<snip>
Using PHP you can force a page not to cache using the header function.

<?php
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
?>

see http://www.php.net/header
I'm sure you can do this with pretty much any language that can output raw headers


As to the other way around, I'm not so sure.

oeb
.



Relevant Pages

  • Re: Classes vs functions
    ... I do cache objects once loaded, ... I do not really understand the implications either, the php documentation is ... not clear about what happens with chains of references, ... the php engine sometimes looses track too :-. ...
    (comp.lang.php)
  • Re: application scope store
    ... objects across HTTP requests. ... But that is in session scope. ... Most children I know are totally unaware of even PHP. ... It's called the operating system file system cache ...
    (comp.lang.php)
  • Re: include_once() within a function
    ... > used by the script, so instead of using include or include_once in the ... static $cache; ... Just declaring them static with no check wether they are allready set would not have the desired effect. ...
    (comp.lang.php)
  • Re: Extension loading. Is it inefficient?
    ... Jerry Stuckle wrote: ... Is there a way to make PHP cache pages under Windows. ...
    (comp.lang.php)
  • Re: [PHP] XCache, APC, Memcached... confused
    ... compiled version of the PHP scripts such that PHP doesn't need to ... And, to be really clear, the savings in compile time is gravy. ... You'd get very similar performance boost if the opcode cache simply cached the PHP source. ...
    (php.general)