Support » Plugin: W3 Total Cache » Insert exclusion rules for the cache

  • Resolved ildomandatore

    (@ildomandatore)


    I would like to insert cache exclusion rules for sitemap and robors.txt. What can I do? is it a good idea to exclude them from the cache?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @ildomandatore

    Thank you for reaching out and I am happy to assist you with this.
    The robots.txt is not cached by W3 Total Cache.
    As for the sitemap, depending on the features enabled in W3TC:
    If you have “Do not process 404 errors for static objects with WordPress” enabled in Performance>Browser Cache, you should add the following:

    sitemap(_index)?\.xml(\.gz)?
    [a-z0-9_\-]*sitemap[a-z0-9_\-]*\.(xml|xsl|html)(\.gz)?
    ([a-z0-9_\-]*?)sitemap([a-z0-9_\-]*)?\.xml

    to “404 error exception list:”

    If Minify is enabled you should also add this to the “Never minify the following pages:” field under Performance > Minify > Advanced (section)
    And also, to make sure, add it to Performance>Page Cache>Advanced>” Never cache following pages” field.

    I hope this helps!

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.