Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

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

I want CloudFlare to cache everything, PHP files too, every request from the domain, I want it to cache it.

Is this possible?

(There are PHP scripts on the domain that print out images, JS and CSS, they return the appropriate mime type, but I read that CloudFlare caches according to file extenstion, if printing out the mime type helps, it's good too.)

share|improve this question
PHP files could return different things at different times so I doubt that CloudFare would cache them. If they really do return the same thing every time then why not make them images/js/CSS files so they get cached? – paulmorriss Oct 11 '11 at 11:20
They change but rarely, the cache for CloudFlare is for 24 hours which is fine with me. CloudFlare also has an option to flush the cache in case I change them manually. – fiftyeight Oct 11 '11 at 23:30

This wasn't possible when you asked the question. This is now possible with PageRules.

Note: You want to exclude the admin section of your site with a PageRule as well. If you do cache everything and the admin section is included, you will likely see some sort of looping error.

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.