plone / plone.cachepurging

provides cache purging for Zope 2 applications
0 stars 4 forks source link

Purge onremove not working correctly #35

Open Sakoes opened 1 year ago

Sakoes commented 1 year ago

Context:

On create: purge requests are correctly being sent:

172.23.0.5 - - [14/Jun/2023:14:38:03 +0000] "PURGE http://purge_proxy:8000/Plone/test1/ HTTP/1.1" 200 241 "-" "python-requests/2.31.0"
172.23.0.5 - - [14/Jun/2023:14:38:03 +0000] "PURGE http://purge_proxy:8000/Plone/test1 HTTP/1.1" 200 241 "-" "python-requests/2.31.0"
172.23.0.5 - - [14/Jun/2023:14:38:03 +0000] "PURGE http://purge_proxy:8000/Plone/test1/document_view HTTP/1.1" 200 241 "-" "python-requests/2.31.0"
172.23.0.5 - - [14/Jun/2023:14:38:03 +0000] "PURGE http://purge_proxy:8000/Plone/test1/view HTTP/1.1" 200 241 "-" "python-requests/2.31.0"

On edit: purge requests are correctly being sent:

172.23.0.5 - - [14/Jun/2023:14:44:11 +0000] "PURGE http://purge_proxy:8000/Plone/test1 HTTP/1.1" 200 241 "-" "python-requests/2.31.0"
172.23.0.5 - - [14/Jun/2023:14:44:11 +0000] "PURGE http://purge_proxy:8000/Plone/test1/view HTTP/1.1" 200 241 "-" "python-requests/2.31.0"
172.23.0.5 - - [14/Jun/2023:14:44:11 +0000] "PURGE http://purge_proxy:8000/Plone/test1/document_view HTTP/1.1" 200 241 "-" "python-requests/2.31.0"
172.23.0.5 - - [14/Jun/2023:14:44:11 +0000] "PURGE http://purge_proxy:8000/Plone/test1/ HTTP/1.1" 200 241 "-" "python-requests/2.31.0"

Problem:

On remove: No purge requests are being sent for the content itself. When I create content under a subfolder (not the siteroot) I can see that purge requests are correctly being sent for the parent folder but not for the content itself:

  1. Create folder http://localhost:8080/Plone/map. Triggers 4 purge requests:
    172.23.0.5 - - [14/Jun/2023:14:57:26 +0000] "PURGE http://purge_proxy:8000/Plone/map HTTP/1.1" 200 241 "-" "python-requests/2.31.0"
    172.23.0.5 - - [14/Jun/2023:14:57:26 +0000] "PURGE http://purge_proxy:8000/Plone/map/listing_view HTTP/1.1" 200 241 "-" "python-requests/2.31.0"
    172.23.0.5 - - [14/Jun/2023:14:58:11 +0000] "PURGE http://purge_proxy:8000/Plone/map/view HTTP/1.1" 200 241 "-" "python-requests/2.31.0"
    172.23.0.5 - - [14/Jun/2023:14:58:11 +0000] "PURGE http://purge_proxy:8000/Plone/map/ HTTP/1.1" 200 241 "-" "python-requests/2.31.0"
  2. Create page http://localhost:8080/Plone/map/test1. Triggers 4 Purge requests for the page and 4 purge requests for the parent folder:
    172.23.0.5 - - [14/Jun/2023:15:09:07 +0000] "PURGE http://purge_proxy:8000/Plone/map/test1/view HTTP/1.1" 200 241 "-" "python-requests/2.31.0"
    172.23.0.5 - - [14/Jun/2023:15:09:07 +0000] "PURGE http://purge_proxy:8000/Plone/map/view HTTP/1.1" 200 241 "-" "python-requests/2.31.0"
    172.23.0.5 - - [14/Jun/2023:15:09:08 +0000] "PURGE http://purge_proxy:8000/Plone/map/ HTTP/1.1" 200 241 "-" "python-requests/2.31.0"
    172.23.0.5 - - [14/Jun/2023:15:09:08 +0000] "PURGE http://purge_proxy:8000/Plone/map HTTP/1.1" 200 241 "-" "python-requests/2.31.0"
    172.23.0.5 - - [14/Jun/2023:15:09:08 +0000] "PURGE http://purge_proxy:8000/Plone/map/listing_view HTTP/1.1" 200 241 "-" "python-requests/2.31.0"
    172.23.0.5 - - [14/Jun/2023:15:09:08 +0000] "PURGE http://purge_proxy:8000/Plone/map/test1/ HTTP/1.1" 200 241 "-" "python-requests/2.31.0"
    172.23.0.5 - - [14/Jun/2023:15:09:08 +0000] "PURGE http://purge_proxy:8000/Plone/map/test1/document_view HTTP/1.1" 200 241 "-" "python-requests/2.31.0"
    172.23.0.5 - - [14/Jun/2023:15:09:08 +0000] "PURGE http://purge_proxy:8000/Plone/map/test1 HTTP/1.1" 200 241 "-" "python-requests/2.31.0"
  3. Remove http://localhost:8080/Plone/map/test1. Triggers only 4 purge requests are being sent, only for the parent folder:
    172.23.0.5 - - [14/Jun/2023:15:11:22 +0000] "PURGE http://purge_proxy:8000/Plone/map/listing_view HTTP/1.1" 200 241 "-" "python-requests/2.31.0"
    172.23.0.5 - - [14/Jun/2023:15:11:22 +0000] "PURGE http://purge_proxy:8000/Plone/map/view HTTP/1.1" 200 241 "-" "python-requests/2.31.0"
    172.23.0.5 - - [14/Jun/2023:15:11:22 +0000] "PURGE http://purge_proxy:8000/Plone/map/ HTTP/1.1" 200 241 "-" "python-requests/2.31.0"
    172.23.0.5 - - [14/Jun/2023:15:11:22 +0000] "PURGE http://purge_proxy:8000/Plone/map HTTP/1.1" 200 241 "-" "python-requests/2.31.0"
davisagli commented 1 year ago

@Sakoes Are you doing the removal via the folder contents (classic), folder contents (volto), via the REST API, or some other way? Just in case it makes a difference, let's make sure we're focusing on the same scenario you tested.

Sakoes commented 1 year ago

I tested this with both the classic UI and with the REST API. Also I am currently using plone 6.0.0 with plone.cachepurging 3.0.0