• Resolved keengamer

    (@keengamer)


    Hello,

    we use this theme https://themeforest.net/item/mylisting-directory-listing-wordpress-theme/20593226 (quite famous and used a LOT). However, we have some regular pages like here https://www.spots4kite.com/croatia/ and when we add a new listing then the cache is not purged and this page and also homepage is not purged and updated.

    This is the answer to our question by the author:

    Listings are posts that belong to a custom post type
    I’m not familiar with the plugin but I assume it should have an option for custom post types as almost every premium theme out there uses custom post types one way or another unless it’s a simple blog theme.

    If you don’t find an option for custom post types, I would check with plugin author

    How can we set it up correctly to have the page cache cleared when a new listing is added?

    Thank you.

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

    (@vmarko)

    Hello @keengamer

    Thank you for your inquiry and I am happy to assist you with this.
    I’ve checked the page provided with and without the cache and there is no difference. Can you please disable W3 Total Cache And let me know how the page should look like?
    As for custom post type, you can add the custom post to Performance>Page Cache>Purge Policy>Aditional Pages:
    For example:
    /croatia/
    Save all settings and purge the cache and see if the problem persists.
    ALso, make sure that you clear the Cloudflare cache as I can see you are also using Cloudflare CDN.
    Thanks!

    Thread Starter keengamer

    (@keengamer)

    Hi.

    Right now the cache is cleared so there is no difference. And adding the pages is quite weird, we would have to add all the pages we have on the site…

    Regarding CF, we don’t cache HTML so there should not be any issues.

    Try the page again, I just added a new spot from private to public status here https://www.spots4kite.com/croatia/ which is not visible there. Which means the old cache is still in place. This spot is missing there https://www.spots4kite.com/spots/plaza-biograd/

    Btw. how can I load the page without the cache?

    PS: Best would be to simply clear all the pages when something is updated, republished etc. Either the pages are not taken into consideration or updating the listing does not count as a post and does not initiate the purge.

    Best,
    Karel

    • This reply was modified 4 years, 10 months ago by keengamer.
    • This reply was modified 4 years, 10 months ago by keengamer.
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @keengamer

    Thank you for the information.
    I’ve added the random query string to the URL https://www.spots4kite.com/croatia/?asdf
    Since you are using the Disk: Enhanced Caching method, once the query string is added the cache is bypassed as Disk: Enhanced does not cache URLs with query strings. And you can see in the source of the page:

    <!--
    Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/
    
    Object Caching 165/171 objects using disk
    Page Caching using disk: enhanced (Requested URI contains query) 
    
    Served from: www.spots4kite.com @ 2021-06-10 14:26:35 by W3 Total Cache
    -->

    However, you are correct, I still cannot see the page https://www.spots4kite.com/spots/plaza-biograd/
    Try adding the /spots/ and /croatia/ to Performance>Page Cache>Purge Policy>Aditional Pages:
    and make sure to enable the following:
    Front page
    Posts page
    Post page
    Blog feed
    Post comments pages
    Post author pages
    Post terms pages
    Post comments feed
    Post author feed
    Post terms feed
    Daily archive pages
    Monthly archive pages
    Yearly archive pages

    Make sure to save all settings and purge the cache and see if the issue persists.
    Thanks!

    Thread Starter keengamer

    (@keengamer)

    So…

    I tried to add the page to exclusion and updated the listing, no luck. I tried to purge the cache, nothing happens as well.

    I tried to delete the cache only for the Croatia page, nothing.

    I went to edit mode with Elementor. There I was able to see all the listings including the missing one. When signed in after going to the editor, now as the admin I can see also correctly all the listings which is fine.

    But in incognito mode the page is still cached in a wrong way and the listing is not visible there.

    All the pages you said are clicked to purge.

    So either there is still something wrong in the settings which I don’t know what or something else is not working wel…

    Edit: I just tried to switch to Disk: Basic and purged the cache. Now it’s visible correctly. Maybe we should change to a different type of cache? Do you have some explanations what to use? We run our own apache server.

    Edit 2: https://www.spots4kite.com/croatia/ there is now visible Plaza Biograd, that listing is now in a draft so it should not be there at all.

    Karel

    • This reply was modified 4 years, 10 months ago by keengamer.
    • This reply was modified 4 years, 10 months ago by keengamer.
    • This reply was modified 4 years, 10 months ago by keengamer.
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @keengamer

    Thank youj for the information.
    I’ve spoken with the team and the problem is following. By default, custom post types don’t clear anything.
    What you need to do is to mark this post type as flushable via hook 'w3tc_flushable_post', ( $flushable, $post, $module );
    and add the /croatia page to the flush list as mentioned so it will be cleared.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Page cache not cleared’ is closed to new replies.