gin-contrib / cache

Gin middleware/handler to enable Cache
https://gin-gonic.github.io/gin
MIT License
378 stars 96 forks source link

How to set custom http header when the cache hit? #67

Open BennyThink opened 4 years ago

BennyThink commented 4 years ago

Hi, I wonder if I can set a customer header to inform the client that the cache has been hit. Is this even possible? I didn't find any resolutions through documents and issues. I'll be grateful if there are some workarounds.

Thanks!

johnjeffers commented 1 year ago

I'd like to know how to do this as well. I looked thru the docs and examples, and the linked PR, but I don't see anything that explains how to do it.

BennyThink commented 11 months ago

Maybe use fork mentioned in above PR.