WordPress.org

Forums

FragmentCache
How to incorporate into Cart66 / dynamic sidebars (2 posts)

  1. oomskaap
    Member
    Posted 1 year ago #

    I really hope this is finally an answer for our, and many other's cart66's sites.

    Currently, we simply show the cart66's cart widget via a sidebar call:

    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(2) ) : endif; ?>

    Is there any way to prevent caching of that sidebar? Or a better alternative to call it that is compatible with your plugin?

    The store's pages are also domain.com/store/cart domain.com/store/checkout etc. Is there a way to disable cashing on all /store/ pages?

    I'm really excited about the prospects of this plugin.
    Thanks!

    http://wordpress.org/plugins/fragmentcache/

  2. Dave Kaplan
    Member
    Plugin Author

    Posted 1 year ago #

    Hi there,

    You can certainly enable caching on only certain parts of the page, that is the main point of using FragmentCache.

    So you could use:
    $cache = new FragmentCache(array('key' => 'unique-key-for-section-1'))

    that wraps one part of the page, leave the sidebar uncached, and then
    $cache = new FragmentCache(array('key' => 'unique-key-for-section-2'))

    for the part after the sidebar (just as an example). As long as the sidebar is not wrapped in a FragmentCache block, it will remain uncached.

    Using this plugin, all the caching must be set up manually in the areas that you want to cache. So as long as you don't stick any FragmentCache references in the /store/ pages, nothing will get cached.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • FragmentCache
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.