bxcodec / httpcache

Get a working HTTP Cache in Go (Golang) with only 3 lines of code!!!!
MIT License
58 stars 15 forks source link

Implement way to handle log messages #30

Open thetillhoff opened 2 years ago

thetillhoff commented 2 years ago

In the current state, the client will print cached-item already expired failed to retrieve from cache, trying with a live version whenever a cache miss happens. And there doesn't seems to be a way to disable/handle those log messages. Or, if there is one, it's not documented.

Whenever a cache makes sense in a go project, there tend to be quite a lot of requests as well. In order to not clog the logs, it would be a very useful feature to be able to adjust what is printed and when - or just disable the messages completely as a first step.

bxcodec commented 1 year ago

Thanks for the issue, will fix this. I'm swamped at the moment. Hopefully I can work on this before 2023