You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Store something in the cache
$ curl -ik https://localhost/
HTTP/2 200
alt-svc: h3=":443"; ma=2592000
cache-control:
cache-status: Souin; fwd=uri-miss; stored; key=GET-https-localhost-/
content-type: text/plain; charset=utf-8
server: Caddy
content-length: 12
date: Sun, 20 Oct 2024 13:50:55 GMT
# Observe it's being cached
$ curl -ik https://localhost/souin-api/souin/surrogate_keys
HTTP/2 200
alt-svc: h3=":443"; ma=2592000
content-type: application/json
server: Caddy
content-length: 592
date: Sun, 20 Oct 2024 13:51:33 GMT
{"GET-https-localhost-/":"\u0004\"M\u0018dp\ufffd\ufffd\u0000\u0000\u0000\ufffd\ufffdHTTP/0.0 200 OK\r\nAlt-Svc: h3=\":443\"; ma=2592000\r\nCache-Control: \r\nContent-Type: text/plain; charset=utf-8\r\nDate: Sun, 20 Oct 2024 13:50:55 GMT\r\nServer: Caddy\r\nX-Souin-Stored-Length: 12\u001b\u0000\ufffd\nTtl: 2m0s\r\n\r\nHello World!","IDX_GET-https-localhost-/":"\nV\n\u0015GET-https-localhost-/\u0012=\n\f\b\ufffd\ufffdԸ\u0006\u0010\ufffd\ufffdԃ\u0003\u0012\n\b\ufffd\ufffdԸ\u0006\u0010\ufffd\ufffd\u0001\u001a\n\b\ufffd\ufffdԸ\u0006\u0010\ufffd\ufffd\u00012\u0015GET-https-localhost-/"}%
# Try to purge the cache with a regex
$ curl -ik -X PURGE 'https://localhost/souin-api/souin/.+'
HTTP/2 204
alt-svc: h3=":443"; ma=2592000
server: Caddy
date: Sun, 20 Oct 2024 13:51:48 GMT
# Observe the cache was not purged
$ curl -ik https://localhost/souin-api/souin/surrogate_keys
HTTP/2 200
alt-svc: h3=":443"; ma=2592000
content-type: application/json
server: Caddy
content-length: 592
date: Sun, 20 Oct 2024 13:51:50 GMT
{"GET-https-localhost-/":"\u0004\"M\u0018dp\ufffd\ufffd\u0000\u0000\u0000\ufffd\ufffdHTTP/0.0 200 OK\r\nAlt-Svc: h3=\":443\"; ma=2592000\r\nCache-Control: \r\nContent-Type: text/plain; charset=utf-8\r\nDate: Sun, 20 Oct 2024 13:50:55 GMT\r\nServer: Caddy\r\nX-Souin-Stored-Length: 12\u001b\u0000\ufffd\nTtl: 2m0s\r\n\r\nHello World!","IDX_GET-https-localhost-/":"\nV\n\u0015GET-https-localhost-/\u0012=\n\f\b\ufffd\ufffdԸ\u0006\u0010\ufffd\ufffdԃ\u0003\u0012\n\b\ufffd\ufffdԸ\u0006\u0010\ufffd\ufffd\u0001\u001a\n\b\ufffd\ufffdԸ\u0006\u0010\ufffd\ufffd\u00012\u0015GET-https-localhost-/"}
Note that curl -ik -X PURGE https://localhost/souin-api/souin/flush works. Maybe the fact that flush directly calls DeleteMany could explain the different behavior, but I'm not sure where the bug is coming from. Hope this info can help!
The text was updated successfully, but these errors were encountered:
Hello, thanks for creating this amazing repo!
I noticed that even after #556 was merged into master, I still can't seem to purge keys by regex. I'm using Caddy and Otter on commit 2968d51.
Here is how to reproduce the issue:
Dockerfile:
Caddyfile:
Test purging by regex:
Note that
curl -ik -X PURGE https://localhost/souin-api/souin/flush
works. Maybe the fact thatflush
directly callsDeleteMany
could explain the different behavior, but I'm not sure where the bug is coming from. Hope this info can help!The text was updated successfully, but these errors were encountered: