Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Go to Page Rule
    1. Click Create Page Rule
    2. Enter your files directory like:
      1. D7

        Code Block
        *yourdomain.com/sites/all/themes*


      2. D8

        Code Block
        *yourdomain.com/themes*


    3. Enter the Following Settings.
      1. Browser cache expire TTL → 5 days (or whatever you want, make sure it is less then edge cache below)
      2. Cache Level → Cache Everything
      3. Edge Cache TTL → a month (or whatever you want)
    4. You can test to see if this is working by running this command in your terminal

      Code Block
      curl -svo /dev/null https://yoursite.com/sites/themes/themename/stuff.css


    5. If you see CF-Cache-Status: HIT in the header, then you are caching files.


Advanced Page Rules on the Pro plan and Up

If you have paid plan you would like to follow this document to setup advanced caching page rules

Make sure you are forcing https as described above. If your site is on Pantheon - make sure you setup all of the redirects to additional domains through CloudFlare and redirects are removed from settings.php otherwise you may run into infinite cache loop.

If your site is on Apache hosting (e. g. Acquia) then make sure you don't have httaccess redirects from additional domains and into https. And all of them are powered through CloudFlare UI.


Filter by label (Content by label)
showLabelsfalse
max5
spacesKALA
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "kb-how-to-article" and type = "page" and space = "KALA"
labelskb-how-to-article

...