WordPress.org

Forums

bodi0`s Easy cache
[resolved] Dynamic sidebar / Dynamic Div excluding. (8 posts)

  1. oomskaap
    Member
    Posted 1 year ago #

    Hi, would you make support for a dynamic sidebar not to be cached? Such as e-commerce sidebars, which needs to be dynamic and show the cart content.

    So far not a single caching plugin supports this. We use cart66 and so far cannot find a solution.

    Thanks.

    https://wordpress.org/plugins/bodi0s-easy-cache/

  2. Budiony Damyanov
    Member
    Plugin Author

    Posted 1 year ago #

    Hello, oomskaap

    Did you try the plugin with your dynamic content? If the dynamic bar/or other HTML element uses AJAX technology (which is almost 100% certain) that means, that no modification of the plugin will be necessary, and the dynamic bar will work.

  3. oomskaap
    Member
    Posted 1 year ago #

    Hi, I call the cart66 widget like this, which is in sidebar.php:

    <div class="sidebarbox-in">
    <h2 class="sidebar-title">Cart</h2>
    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(3) ) : endif; ?>
    </div>

    I add an item, it works. But when I refresh the page, the cart item would be empty again. The same affect as with other caching plugins, unfortunately.

    I wish there was a rule where you can exclude compelete .php files from caching so i can just put sidebar-left.php, and sidebar-right.php and be done.

  4. Budiony Damyanov
    Member
    Plugin Author

    Posted 1 year ago #

    You can exclude pages/posts with Easy cache plugin, just select the original container page (the one, which you use for displaying the "Cart").

    See plugin's setting "Exclude pages/posts from caching".

  5. Budiony Damyanov
    Member
    Plugin Author

    Posted 1 year ago #

    ...also you can exclude any other page (which is used as container and have dynamic content on it).

  6. oomskaap
    Member
    Posted 1 year ago #

    Yes however this will go back to the original problem with dynamic content and caching. This sidebar is on EVERY page. Or the cart items shows in every page due to being in the footer. So if you disable all the pages then no need to use a caching plugin.

    I think it is just impossible to have ecommerce + caching.
    Thanks for your time trying to help!

  7. Budiony Damyanov
    Member
    Plugin Author

    Posted 1 year ago #

    By its very definition, the caching process is a collection of data, which duplicates original values, stored elsewhere or computed earlier, where the original data is expensive to fetch, and served later to the end user instead of the original data.

    The only way to achieve what you need is to place the dynamic content (sidebar) inside an iframe. This is the way to combine the data, computed earlier with the original data, because actually an iframe is a window inside a window. So the cached page will contain this iframe, which will point to the dynamic page, which generates the current Cart state.

    This however will require modification of the sidebar and/or the theme you use.

  8. oomskaap
    Member
    Posted 1 year ago #

    Thanks, I will actually now start to convert to an iframe, and still use your plugin. Thanks again for the great support.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • bodi0`s Easy cache
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.