Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Like this:

Visitor (or user whatever) requests trough GET, then gets cached by the server, and all further requests of that page are served from cache, until a POST request is received.

When a POST request is received, cache gets flushed, page generated normally trough the script, and at the next GET request cache the page again until next POST request and so on...

Does it sound reliable and possible? Is there some Apache module that is able to do this? I think that some shared hosts do this (so they can stuff many sites on a server), but I'm not 100% sure.

share|improve this question
up vote 3 down vote accepted

Have you looked at mod_cache or a reverse proxy such as Squid, Varnish or nginx yet? These cache any responses with the appropriate headers set.

You would need to write something in the code that handles your POST requests to invalidate the cache whenever it is required.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.