Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @emiel9d

    Thank you for reaching out and I am happy to assist you with this.
    The Page is cached once visited, and the cache is purged if the article or the post has been changed, updated, or published.
    Once you upload the image and the process of the resize is finished, have you tried purging the page cache for the specific page in the top admin bar?
    Thanks!

    Thread Starter emiel9d

    (@emiel9d)

    Hello Marko,

    Thanks for your quick reply. I have tried your method and this indeed works. However this isn’t an ideal situation for a website with alot of pages. That’s why I was hoping there could be some sort of automated solution by checking if the admin-ajax.php is shown on the page. Perhaps there could be a setting where we can add regex patterns to check before deciding to cache or not. If this could be added this would be a really nice feature for YOOtheme users (or other themes which work the same way).

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @emiel9d

    Thank you for your feedback.
    IF the regex is added, this means that the page will not be cached at all – never.
    The ajax requests are not cached by default.
    I’ll have a chat with the team and see if there is anything we can do about this, however, the best solution for this is to purge the cache of the specific page.
    Thanks!

    Thread Starter emiel9d

    (@emiel9d)

    Hi Marko,

    If you can hook into the HTML-output (DOM) before its being send out to the browser I believe this shouldn’t be the case. Without the cache plugin the first HTML-ouput will include the ajax request within the src attribute of an image. The second time the page is visited the HTML-ouput will include a regular image.

    For some of our projects we use the following to manipulate the DOM-output, maybe your development team could use this or the idea behind it.

    add_action(‘wp_loaded’, ‘buffer_start’);
    add_action(‘shutdown’, ‘buffer_end’);
    function buffer_start()
    {
    ob_start(“callback”);
    }
    function buffer_end()
    {
    ob_end_flush();
    }
    function callback($buffer)
    {
    // Changing the buffer, for example with str_replace
    return $buffer;
    }

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @emiel9d

    Thank you for your feedback.
    I’ll share this with the team and we also need to take into consideration a lot of other use cases besides this one and how they will affect the caching.
    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Prevent cache generation in certain situations’ is closed to new replies.