• Resolved stevehume

    (@stevehume)


    I would like to be able to purge a specific page cache using SG Optimizer rather than have to purge the whole cache.
    In this example the Home page, has some dynamic content. When a new WooCommerce product is added the Home page should show this in the ‘New In’ section (Storefront theme).

    At the moment the new content does not show until the cache expires, which can be up to 24 hours, unless the whole cache is purged manually. The new product page does appear in the cached pages just not the link to it on the home page.

    Is there a possibility of adding a ‘Clear Cache’ button on a page similar to WP Rocket has rather than expiring everything in the cache when a new product is added?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    Well, that’s not really convenient. You can just update the post and cache will purge. The main question here is why your home page is not purged automatically when you add a new product. That should happen automatically. Do you mind sharing your site URL?

    Thread Starter stevehume

    (@stevehume)

    Hi Hristo, I’m not sure why it’s not purging automatically either, which would be good.
    The home page link is: https://www.wensleydalelongwool.co.uk/

    Hello @stevehume,

    We had a look at the issue you were experiencing and it looks like it was caused by the parameter added after your home URL. When the website is accessed, it automatically redirects to a URL with /?v=xxxxxxx suffix.

    When you update a product, the smart rules are being applied automatically. We purge the product page cache, its parents, all product-related terms, blog page, feeds, and index page.

    All of the requests were checked and are working as expected, however, the additional parameter is not being purged. The reason is that when we purge the index page, the purge request being sent is only for the home page. However, it is then redirecting to the /?v=xxxxxxx version which on the other hand is still being cached.

    After some research, we noticed that this parameter seems related to WooCommerce’s Geolocate with the page caching support option which requires MaxMind integration. Most likely it keeps this /?v=xxxxxxx URL cached for some time instead of changing it dynamically.

    Regards,
    Kristiyan

    Thread Starter stevehume

    (@stevehume)

    Hi @ayvazovkristiyan

    I understand your explanation. I’m just wondering what can be done about it.

    The WooCommerce geolocation documentation states:
    Geolocate address, or
    if you are using a cache system, Geolocate with page caching support. Is the same as above, but does the geolocation via Ajax. This option adds to your website URLs a ?v=xxxxx parameter. This is normal to prevent static caching of prices.

    You must manually clear the cache of your cache plugin and your hosting provider after set Geolocate with page caching support.”

    I’m not clear if this means selecting ‘Geolocation address’ (without caching) option would work better under the circumstances and rely on SG Optimizer smart cache instead. There is a need to ‘prevent static caching of prices’.

    Thanks
    Steve

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Purge specific Page Cache’ is closed to new replies.