Support » Plugin: Custom Facebook Feed » Comet Cache vs Custom Facebook feed

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author smashballoon

    (@smashballoon)

    Hey Johan,

    I installed the Comet Cache plugin to try it out and see what options they include. It looks like the problem is that the Comet Cache plugin cache isn’t clearing when our plugin checks Facebook for new posts, and so it still displays the old feed. The easiest solution would be to disable caching on the page that you have the Facebook feed on. I couldn’t see a setting in their plugin to do this via their user interface, but they did include a way to do this in the code. If you add the following to the PHP template for your specific page then it should uncache that page:

    <?php
    $_SERVER['COMET_CACHE_ALLOWED'] = FALSE;
    ?>

    Alternatively, you could add it to your theme’s footer.php file in conditional tags so that it only affects a specific page:

    <?php
    if( is_page( 'news' ) ){
      $_SERVER['COMET_CACHE_ALLOWED'] = FALSE;
    }
    ?>

    If you’re uncomfortable adding this to the theme then you could also check with the developer of that plugin whether there’s a way to do this in the settings.

    Let me know whether that helps,

    John

    Johan

    (@hectornado)

    Hi! A Comet Cache developer gave me this answer below.
    Can you give me any hint on what would be the best solution to solve the problem?
    Thank you very much.

    Comet Cache is a page caching plugin, which means it captures the output from WordPress and stores that output in a static HTML file, only updating the static HTML file when the WordPress content changes.

    For that reason, any plugins that produce dynamic content (such as the Custom Facebook Feed plugin) must take into consideration WordPress caching plugins, either by telling the WordPress caching plugin not to cache the page where the plugin is located, or, even better, making use of client-side JavaScript to dynamically update the content so that the plugin is unaffected by server-side caching.

    If the Custom Facebook Feed plugin is not compatible with WordPress caching plugins, you can exclude the page where the Facebook feed shows up by excluding the URI of the page in Comet Cache → Plugin Options → URI Exclusion Patterns. Otherwise, I recommend contacting the plugin developer(s) for Custom Facebook Feed and asking them about compatibility with caching plugins.

    Plugin Author smashballoon

    (@smashballoon)

    Hey Johan,

    It sounds like the best solution would be excluding the page that the plugin is on from being cached, by adding the URL of the page to the following setting in that plugin:

    Comet Cache → Plugin Options → URI Exclusion Patterns

    We’ve considered using JavaScript to update to the feed but as that would most likely negatively affect the SEO value of the content then we chose to stick with PHP to embed the content into the page. We will look into adding a setting to allow the user to choose in a future update though.

    Let me know whether excluding the URL of your page from being cached solves the problem for you.

    Thanks!

    John

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Comet Cache vs Custom Facebook feed’ is closed to new replies.