Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Like this:

Visitor (or user whatever) requests site.com/page1/ trough GET, then site.com/page1/ 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

1 Answer 1

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

 
discard

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.