WordPress.org

Support

Support » Plugins and Hacks » Booking Calendar » [Resolved] [Plugin: Booking Calendar] caching issue

[Resolved] [Plugin: Booking Calendar] caching issue

  • I am using the quick cache plugin and it is caching the availability widget.

    Is there some way to exclude the widget with:

    define(“DONOTCACHEPAGE”, true);

    Thanx

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author wpdevelop

    @wpdevelop

    Hello,
    Please write exact name of this caching plugin or link to this plugin, for I be able to check it.
    Thank you.

    it is Quick Cache:

    http://www.primothemes.com/post/product/quick-cache-plugin-for-wordpress/

    It supports:
    define(“DONOTCACHEPAGE”, true);
    define(“QUICK_CACHE_ALLOWED”, false);
    $_SERVER[“QUICK_CACHE_ALLOWED”] = false;

    What caching plugins does Booking Calendar support?

    Plugin Author wpdevelop

    @wpdevelop

    I will check it later and then reply to you.
    Thank you.

    Plugin Author wpdevelop

    @wpdevelop

    Hello again,
    the Booking Calendar is not have definition of this constants:
    define(“DONOTCACHEPAGE”, true);
    define(“QUICK_CACHE_ALLOWED”, false);
    $_SERVER[“QUICK_CACHE_ALLOWED”] = false;
    So, if you want that some of your page is not caching with booking calendar, you need to define one of this constant at the header or footer of that page (I think you can open heder.php or footer.php file of your actual theme). Please note you need to have some rule to determine that this and not other have not to be cached, so its can look like this:

    <?php
    if ( strpos($_SERVER[‘HTTP_HOST’],’some_url_tag’) !== FALSE ) define(“DONOTCACHEPAGE”, true);
    ?>

    where some_url_tag – its some URL tag of opening page.
    Also please note, its will work for some specific page with “url tag”, but if you need to exclude ewidget, you need to define rule, where widgets are appear at your site. If its appear at all pages so then I think its not possible to use these 2 plugins togather, because as far as I am see the Quick Cache plugin is make cache entire page.

    Thank you for your response.

    I love your booking plugin and was in the process of getting a client to buy the hotel version, but without being compatible with any caching program I’m afraid this will not be feasible.

    I strongly recommend that the widget code is rewritten as a javascript insert or iframe so it stays dynamic and is compatible with ALL caching programs. I think you will find that I am not the only one with this issue and MANY WordPress users are using caching on their sites.

    Cheers.

    Plugin Author wpdevelop

    @wpdevelop

    Hello, the native support of it inside of Booking Calendar will be at some future versions update. Thank you.

    I came up with a solution.

    1. Copied page.php template file and named it page-availability.php
    2. Added define(“DONOTCACHEPAGE”, true); to the top.

    So now the regular page does not get cached.

    1. Made a new page “frame” in admin with no content.
    2. Made new template file page-frame.php with this code:

    <?php
    define("DONOTCACHEPAGE", true);
     ?>
    <html>
    <head>
    <?php wp_head(); ?>
    </head>
    <body>
    <?php show_booking_widget_php4(1); ?>
    </body></html>

    3. Used a text widget with

    <iframe src="/frame/" width="200" height="460" frameborder="0" scrolling="no" ></iframe>

    So far from what I can see this is working perfect.

    Cheers.

    Plugin Author wpdevelop

    @wpdevelop

    Great,
    thank you.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] [Plugin: Booking Calendar] caching issue’ is closed to new replies.
Skip to toolbar