You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expect the service to automatically clean the cache once the rate_limit has expired (for the given Key). For example, if the key_func is IP Address, and we set a limit of 1 time per hour, once Flask limiter determines the hour has passed, it should clear the cache. There is no point/need in keeping old requests that are outside the limiting time period once the period has passed (if anything, they should be logged in a more persistent storage, not memorystorage).
For v1 of this new feature, I would expect it to check on every call of the decorated route(s). For v2, you could spin off a separate microservice that is constantly monitoring and clearing caches (even a paid upgrade).
Thanks!
The text was updated successfully, but these errors were encountered:
I was about to ask about this because I couldn't find an answer in the documentation. Does the memory keep filling up then, the longer that the flask app is running? I would expect periodic garbage collection, at the very least, probably when receiving another event that checks the limiter, and then at that time the limiter deletes expired entries. If doing it on every event might be too expensive, then there probably needs to be some configurable parameter to clean the cache every N events, or something similar.
Expected Behaviour
Expect the service to automatically clean the cache once the rate_limit has expired (for the given Key). For example, if the
key_func
is IP Address, and we set a limit of 1 time per hour, once Flask limiter determines the hour has passed, it should clear the cache. There is no point/need in keeping old requests that are outside the limiting time period once the period has passed (if anything, they should be logged in a more persistent storage, not memorystorage).For v1 of this new feature, I would expect it to check on every call of the decorated route(s). For v2, you could spin off a separate microservice that is constantly monitoring and clearing caches (even a paid upgrade).
Thanks!
The text was updated successfully, but these errors were encountered: