darkweak / souin

An HTTP cache system, RFC compliant, compatible with @tyktechnologies, @traefik, @caddyserver, @go-chi, @bnkamalesh, @beego, @devfeel, @labstack, @gofiber, @go-goyave, @go-kratos, @gin-gonic, @roadrunner-server, @zalando, @zeromicro, @nginx and @apache
https://docs.souin.io
MIT License
719 stars 56 forks source link

Small bug when hiding the key? #564

Closed teodorescuserban closed 3 weeks ago

teodorescuserban commented 1 month ago

Hello,

I am using souin as caddy plugin (1.7.2) I noticed that when I am trying to hide the key, the key is hidden, but the key= is not.

cache-status: test; hit; ttl=2; key=; detail=REDIS

vs

cache-status: pilula; hit; ttl=4; key=/some/key ; detail=REDIS

Versions:

/etc/caddy # caddy version
v2.8.4 h1:q3pe0wpBj1OcHFZ3n/1nl4V4bxBrYoSoab7rL9BMYNk=
/etc/caddy # caddy build-info | grep souin
dep     github.com/darkweak/souin       v1.7.2  h1:i9t/fdCgvBuKM7NNYcqnCQCmFlk9nEF91ltuksfFyjs=
dep     github.com/darkweak/souin/plugins/caddy v1.7.2  h1:EVYHOcRsr3XnM45RiGKATogk3qy1/cH8rVR8p+BDe14=
darkweak commented 1 month ago

Hey @teodorescuserban this is the desired behavior.

teodorescuserban commented 1 month ago

Hey @teodorescuserban this is the desired behavior.

Would be better to have key=* so it's obvious that it is hidden; just key= makes you think there's an issue and something is incomplete.

But if this is the intended behaviour, I guess this issue can be closed 😄

darkweak commented 1 month ago

I didn't think about using stars to tell the users it's hidden. 👍

teodorescuserban commented 4 weeks ago

Leaving it open, please close it anytime you want, whether you add some *** or not. :)

darkweak commented 3 weeks ago

@teodorescuserban implemented this behavior (*****) when key is hidden and available on master.

darkweak commented 3 weeks ago

Available in v1.7.5 🙂