I have a PHP 5.1.0 website (actually it is 5.2.9, but it should also work on 5.1. 0+).
Pages are generated dynamically, but many of them are mostly static. By static, I mean that the content does not change, but the “pattern” around the content may change over time.
I know that these are already several cache systems and PHP frameworks, but APC or Memcached are not installed on my host, and I do not use the framework for this particular project.
I want pages to be cached (I think PHP defaults to "denying" cache). So far I'm using:
session_cache_limiter('private'); //Aim at 'public' session_cache_expire(180); header("Content-type: $documentMimeType; charset=$documentCharset"); header('Vary: Accept'); header("Content-language: $currentLanguage");
I have read many lessons, but I can’t find something simple (I know that cache is something complicated, but I need only some basic things).
What "should" have headers to send to help caching?
AlexV Dec 28 '09 at 21:43 2009-12-28 21:43
source share