-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cache does not work! #276
Comments
Seems someone else also had this issue: https://stackoverflow.com/questions/76087851/why-is-mosquitto-go-auth-not-caching-auth-requests |
This might be a regression from the introduction of |
I can take a look and find the regression. Would you please give me the commit id that you guess cause this issue? |
Oh, wait, that was introduced back in late 2020, so this would've been utterly broken for a long time if it was related. |
As for the Good catch! |
If you set the log level to debug, you should be able to see if it's even attempting to hit the cache. For example, from
|
Anyway, If I finish a couple of things in the next few minutes, I'll probably be able to take a quick look. Otherwise, next week it'll be. Cheers! |
go-cache test passed! I think I found the issue! I realised that I have cache-miss because of the topic name change! |
Just one more thing. Doesn't it support superuser check? |
It should out of the box since setting the cache record is in the upper layer that doesn't care if the original check passed because of ACL rules or because of superuser abilities. |
I'll try to submit a PR if I could make any improvements. Thanks again. |
@ziXet I see you closed the issue. What was the actual resolution? |
Yes, it was my app that was changing the topic! No issue on your code. Thanks |
First of all, thanks for this awesome plugin!
My issue:
We would like to reduce the number of calls to our http auth backend by using cache. Particulary, we want to use the built-in "go-cache". However, it seems that the caching system does not work at all! no matter how we configure it.
Image: iegomez/mosquitto-go-auth:2.1.0-mosquitto_2.0.14
Config:
Related Logs:
Not sure why this info msg shows up: "redisCache activated"!
We are still seeing acl requests to our HTTP backend.
Any help would be appreciated :-)
The text was updated successfully, but these errors were encountered: