Open gecon opened 3 years ago
Hi @gecon
Thanks for your contribution.
Just to double-check, can you please confirm you are using our Varnish Add-on?
Hi @GeekPress, yes I am using Varnish addon. Varnish is cleared with success on all other cases (for example when editing a post).
The problem is only when scheduled ("future") posts are getting published by using cron. The future post is published but the pages that reference the new post are not purged from Varnish. I am also using this helper https://github.com/wp-media/wp-rocket-helpers/tree/master/compatibility/wp-rocket-compat-varnish-ip/ which is very simple and must be irrelevant to the problem.
Varnish is purged successfully by WP-Rocket, the problem is when a 'future' post get's published.
Ok, thanks for the confirmation :)
Hi, dropping a message after ~ 22 months here.
A lot of big news coverage websites are using WordPress nowadays.
Varnish as a caching layer is quite common for such big sites, since they are perfect candidates for Varnish caching to serve most requests without PHP execution.
This bug here makes WP-Rocket a bad idea for those sites. Because more than 90% of the posts are scheduled.
Thank you.
Before submitting an issue please check that you’ve completed the following steps:
Describe the bug Varnish cache is not correctly purged when scheduled posts are published. When a schedule post get's published, the cache for all URLs where this post should appear is not purged (for example homepage should be cleared when a scheduled post is published which should appear in homepage).
To Reproduce Steps to reproduce the behavior:
Expected behavior Pages where the scheduled post appears must be purged from Varnish when a scheduled post gets published (or simply the whole Varnish cache should be purged), in order for the post to show up in all the right pages.
Additional context All other varnish purge commands are working fine on the site. For example editing a post, correctly purges the URL from Varnish.
Backlog Grooming (for WP Media dev team use only)