WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
[resolved] Latest update will not cache custom template pages (10 posts)

  1. phoenixMagoo
    Member
    Posted 1 year ago #

    I'm using custom templates to generate specific rss feeds (see http://www.wprecipes.com/creating-user-defined-rss-feeds-in-wordpress).

    The database caching works, the object caching works, but the page caching isn't working. I can see the total cache page caching comment at the bottom of the page, but it doesn't print out any information (even with debug mode turned on).

    Any one have any suggestions or articles that would help me solve this problem?

    Thanks!

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. phoenixMagoo
    Member
    Posted 1 year ago #

    I found a quick solution. If the header is changed from:

    header("Content-Type: application/rss+xml; charset=UTF-8");

    to

    header("Content-Type: text/xml; charset=UTF-8");

    Total Cache works perfectly again.

  3. mbrsolution
    Member
    Posted 1 year ago #

    Hi that is great news, I am glad you were able to resolve your issue. If this is resolved could you please close this ticket.

    Thank you kindly.

  4. Frederick Townes
    Member
    Plugin Author

    Posted 1 year ago #

    That header is a rss feed header. You need to enable feed caching on Page Cache settings page to cache templates that use that header.

  5. phoenixMagoo
    Member
    Posted 1 year ago #

    Hmmm. Still no dice. I enabled: rdf, atom, rss, rss2. The Total Cache comment looks like this with debug turned on:

    <!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

    Served from: (taking out the server name, but it's there) @ 2013-02-07 09:17:48 by W3 Total Cache -->

    Honestly changing the header to header("Content-Type: text/xml; charset=UTF-8"); isn't a massive deal for the project I'm working on. If you are too busy, don't worry about it. Thanks for the help!

  6. JochenT
    Member
    Posted 1 year ago #

    Have you enabled check box "Cache feeds: site, categories, tags, comments" on Page Cache settings page, too?

  7. phoenixMagoo
    Member
    Posted 1 year ago #

    I just went back and checked that box. Still no dice. Rolled back to text/xml and started caching again. Weird, right?

  8. Frederick Townes
    Member
    Plugin Author

    Posted 1 year ago #

    So you checked the cache feed checkbox and changed header to text/xml and everything cached properly? If that is correct please mark this as resolved.

  9. sanchothefat
    Member
    Posted 1 year ago #

    Hi Frederick,

    I'm having this same issue, while using the text/xml header works I would like to know how to add support for other content-type headers used with feeds?

    There are cases where we generate feeds for use in iOS apps and they have to have a specific content-type header in order to work.

    I'm struggling to work out where in the code the content-type of text/html or text/xml is used to trigger the page cache, can you point me in the right direction? Would be useful if I could filter it perhaps in a later version.

    Thanks!

  10. sanchothefat
    Member
    Posted 1 year ago #

    Not to worry, I found this filter as of version 0.9.2.9 which lets me add the atom feed content type:

    w3tc_is_cacheable_content_type

    Cheers

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic