WordPress.org

Ready to get started?Download WordPress

Forums

Booking Calendar
[resolved] caching issue (9 posts)

  1. islandcastaway
    Member
    Posted 3 years ago #

    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

  2. wpdevelop
    Member
    Plugin Author

    Posted 3 years ago #

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

  3. islandcastaway
    Member
    Posted 3 years ago #

    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?

  4. wpdevelop
    Member
    Plugin Author

    Posted 3 years ago #

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

  5. wpdevelop
    Member
    Plugin Author

    Posted 3 years ago #

    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.

  6. islandcastaway
    Member
    Posted 3 years ago #

    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.

  7. wpdevelop
    Member
    Plugin Author

    Posted 3 years ago #

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

  8. islandcastaway
    Member
    Posted 3 years ago #

    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.

  9. wpdevelop
    Member
    Plugin Author

    Posted 3 years ago #

    Great,
    thank you.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags