waro163 / flask-restframework

flask restframework, inspired by Django-rest-framework
1 stars 0 forks source link

throttle problem #1

Open waro163 opened 2 years ago

waro163 commented 2 years ago

https://github.com/waro163/flask-restframework/blob/987565683717c0c7cb9edfcdc318fd847377fae6/flask_restframework/throttling.py#L91-L127

if i use same throttle class in different api, any one api will affect the others' throttling, because they use same cache key in class. i don't want to write many same throttle class that only changing cache key inside. so change the above code to support this situation.

waro163 commented 2 years ago

A better solution is putting request.path in the cache key, but it will cause the cache key be longer, maybe other good solution?