- Issue created by @roderik
- Merge request !6Remove space between * and tag, from CacheTag parameter for PurgeTags HTTP call → (Merged) created by roderik
- Status changed to Needs review
10 months ago 1:27pm 26 February 2024 - Status changed to RTBC
10 months ago 3:47pm 26 February 2024 - 🇦🇹Austria fago Vienna
We ran into in issue with a cache-tag not being purged, this fixes the issue nicely and should be quite safe - main thing is we keep the space in the suffix!
- 🇧🇪Belgium dieterholvoet Brussels
Yeah, that makes sense. Only problem I could think about is that now, when invalidating
node:130
, it would invalidate any cache tags that end withnode:130
. For examplesomething_node:130
would be invalidated as well. Seems rather rare in this case, but still, it wouldn't be ideal to leave this in. That would be a hard to debug issue if it ever happens.The 100% correct way seems to me to do three requests: one in case the cache tag we're invalidating is the first one, one if it's in the middle and one if it's the last one.
$this->request('POST', "pullzone/$pullZone/purgeCache", [ RequestOptions::JSON => [ 'CacheTag' => "$tag *", ],
$this->request('POST', "pullzone/$pullZone/purgeCache", [ RequestOptions::JSON => [ 'CacheTag' => "* $tag *", ],
$this->request('POST', "pullzone/$pullZone/purgeCache", [ RequestOptions::JSON => [ 'CacheTag' => "* $tag", ],
I just checked and pricing doesn't seem to depend on the amount of API calls or the amount of purges, so I don't think it would be a problem to do three API calls instead of one. What do you think?
- Status changed to Needs review
10 months ago 10:04pm 4 March 2024 - 🇳🇱Netherlands roderik Amsterdam,NL / Budapest,HU
LOL. I didn't get 'the syntax for that purge command' until I read your last message. I only now realize that BunnyCDN stores the whole string as a single tag.
Well in that case... I think instead of doing 3 requests, we can and should make sure the BunnyCDN tag starts and end with a space, so that the current
* DRUPAL-CACHETAG "
purge command always works?See new proposal in the next commit, for your review of concept. (Untested so far, but I don't see why it shouldn't work.)
- 🇧🇪Belgium dieterholvoet Brussels
Looks good! Let me know if you were able to test this in practice and I'll merge it. I'm not doing cache tag based invalidations anymore on my project, so I don't have an easy way to test this.
- Status changed to RTBC
9 months ago 12:49pm 21 March 2024 - 🇦🇹Austria fago Vienna
That's indeed better! We've tested the updated patch successfully to work correctly, so back to RTBC.
-
DieterHolvoet →
committed c878056f on 1.x authored by
roderik →
Issue #3423820 by roderik, fago, DieterHolvoet: invalidateTags() HTTP...
-
DieterHolvoet →
committed c878056f on 1.x authored by
roderik →
- Status changed to Fixed
9 months ago 12:54pm 21 March 2024 Automatically closed - issue fixed for 2 weeks with no activity.