There is a problem with this module happens for pages not found.
Steps to reproduce:
1. As an anonymous user visit page /non-existing-page
2. You can see 404 error, but this page got cached by Varnish
3. As an admin using a different browser add a new node with the URL alias /non-existing-page
4. Visit /non-existing-page as an anonymous user
5. You can still see 404 error
The problem happens because not found page does not have the unique cache tag, so there is no way to flush cache for it using cache tags. 404 page has only basic Drupal tags and there is no way to assign the unique cache tag for it, because such page does not exist. We don't know whether it would be a node-1 or node-2 in advance.
I am not sure if using URL Queuer would be a good idea here since it will queue tons of URLs. At least on the new page (node, entity, view, etc...) creation we need to flush Path/URL for such page. Is there a way to do it? Is there a workaround?
Comments
Comment #2
dealancer commentedMoving this issue to the Purge module issue queue.
Comment #3
maximpodorov commentedDefault blacklist in purge_queuer_coretags.settings contains "4xx-response" tag which is obviously incorrect (as caches for all 404 pages must be invalidated when content is created or updated).
Comment #4
lpeidro commentedHello,
We are experiencing this issue on a client project, but the solution proposed by maximpodorov is not working properly in our case and does not resolve the issue.
We have created a simple module that might be useful to help solve this problem Url Purge Aggregator.
It is a very simple queuer that adds the URLs to the Purge queue when a node is edited or removed. This functionality can be enabled through configuration.
In this case, it would be necessary to implement the hook_entity_insert() hook to use the service provided by the module (url_purge_aggregator.queuer) to add the node's URL when it is created.
I have created an issue to add this option as well (https://www.drupal.org/project/url_purge_aggregator/issues/3511238).
I hope this module can be useful.