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.)

  • 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
  • 1
    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.

  • if I uploaded files to my WordPress upload folder .. small files not more than 30 MB and offered links for users to download if I used page rule like this site.com/wp-content/uploads can I make Cloudflare cache those files to my visitors when they try to download it, those files, not images most likely website app APK and some zip files but with a huge bandwidth consumption – Joe Nov 29 '19 at 20:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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