-
Notifications
You must be signed in to change notification settings - Fork 16
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
Flush out old logs that have expired (MemoryRateHandler) #3
Comments
Yep - I'm happy to take some PR on this! And in case you're interested :) -- this library needs to be updated with a better code style (using prototypes. Actual method comments, proper error handling, and clearer docs. Here's a recent middleware example I wrote with the style and docs I'm talking about. I haven't had time to maintain this lib, as we don't actively use it for Segment.io. But if you have some time, I'd love to accept some PRs in this direction. Thanks! |
@ivolo, do tests pass for you? After cloning the project, installing "expresso", and adding "express" and "should" to the dev dependencies, I run "make test" and I get many errors like this:
Did you face this before? I don't know why I'm getting "Error: Response not completed" with expresso. |
BTW you can see the changes I propose here https://github.com/palmerabollo/express-rate/compare/feature;memory_ttl?expand=1 , but I'd like to test it a bit more and make your tests pass. |
Express-rate should flush out very old remote logs that have expired (redis does that for you).
One alternative is to use node-cache, an in-memory cache with a put = function(key, value, time) function that handles the expiration times for you.
I could implement it if you are interested on it.
The text was updated successfully, but these errors were encountered: