Open OleksandrBoiko1 opened 2 months ago
Thanks for reporting! Would you like to send a Pull Request to address this issue? Remember to add unit tests.
Hi @mcollina I am able to implement this feature for Redis as a store but not for LRU Cache. Need some help.
Why? What's the problem? An in-memory implementation should be easier.
In Redis, It is easier to modify the key. As per my understanding for LRU cache, different instance of cache is being created for each route. Incase of redis, same redis instance is being used.
Its done
Prerequisites
🚀 Feature Proposal
It'll be great to have an option to apply rate limit for this two endpoints, not for the whole project. Something that required here. Because solution from issues is not working
Important notice, I mean that rateLimit should calculate calls for this two endpoints, not separate
Thanks!
Motivation
Usefull feature!
Example
Register fastifyRateLimit only for encapsulate endpoints
fastify.register(fastifyRateLimit, { config: { rateLimit: { max: 3, timeWindow: '1 minute' } } })