saloon icon indicating copy to clipboard operation
saloon copied to clipboard

Using cache and rate-limit plugin together

Open gino opened this issue 2 months ago • 0 comments

Hi there,

I am wondering if the cache plugin and the rate-limit plugin are compatible to work with each other.

I got a pretty confusing issue at the moment. For some reason, my endpoints are still being rate limited even though they are cached. I see that they are cached in my (in this case) Redis store but my endpoint still caught a "Too many attempts" exception.

To me it feels like the endpoint is still receiving requests even though it has been cached. I am trying to avoid rate limiting by caching my requests - but because of this issue, it seems like it's still getting ratelimited even though it is cached.

I did a quick test and it looks like this doesn't happen anymore after removing the HasRateLimits trait from my request but I am not too sure yet if this causes the issue.

Are there any others with similar problems?

I'll try to look into the issue and post some more updates/information.

gino avatar Oct 23 '25 10:10 gino