Currently the invalidations are offered together by the purge module and the cloudflarepurger is wrongly trying to handle just a single type of invalidations. This is a result of the check of just the first invalidation of the offered ones and assuming all others are the same. Could be that with older version of the purge module the invalidation method was called multiple types for every different type.

Here is a small rewrite so this is handled correctly.

Issue fork cloudflare-3129594

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

SimeonKesmev created an issue. See original summary.

gambry’s picture

Status: Active » Needs review

Let's see what testbot says.

alexj12’s picture

Status: Needs review » Reviewed & tested by the community

+1 on this patch working and code reviewed.

dungahk made their first commit to this issue’s fork.

emersonreis.dev’s picture

Good work on the patch! I tested it as well and working fine and code looks good!

The Merge Request I opened does the chunking inside the purge method instead of on the invalidate method, that could help in case you got a invalidate everything in the middle of the list so instead of running loads of tags and URL API requests you just run the everything one.

perecedero.’s picture

Updated @gambry path to work with the latest beta3 release.

rosk0’s picture

Version: 8.x-1.0-alpha11 » 2.0.x-dev
Priority: Major » Normal
Status: Reviewed & tested by the community » Needs work

This needs issue summary update, and if this is really a bug, than it needs at least steps to reproduce it, but ideally test that will prove the bug.

kleinmp’s picture

I rerolled this patch for the current 2.x-dev version.

piotr pakulski’s picture

Confirming patch #9 works great for me.
+1 for this issue to be merged
Reproduction steps:
- in drupal have node which when saved is going to refresh a content of some file that exists in public filesystem under specific url
- during the node save have some custom code that is adding the URL of the file to revalidation queue
- as a result in purge queue table we have a list of tags and the URL to invalidate
- when queue processed (drush pqw). Cache for tags invalided fine. Cache for URL not invalidated. No errors in logs
- when adding URL to queue manually by drush. The URL is the only item in the queue. Running drush paqw. The URL is indeed invalidated

piotr pakulski’s picture

Status: Needs work » Needs review
StatusFileSize
new3.79 KB

Actually the patch #9 is failing for type "everything"
there is leftover in the patch - fixed that and attaching the new working version of the patch.

piotr pakulski’s picture

StatusFileSize
new2.05 KB
rosk0’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests, +Needs issue summary update

Hi Piotr,

Thanks for progressing this, but in order for it to receive proper review the patch should be converted to a merge request. There is already one exists feel free to use that or create a new one.

Adding tags for #8.