Replies: 3 comments 4 replies
-
See:
|
Beta Was this translation helpful? Give feedback.
-
From what I see, you're trying to ask 3 different questions (cmiiw): How to set different rates for different views?Yes, there are two approaches I can think of:
How to check if the scope is blocked?You can instantiate the throttle and call the If you're searching for a way to check it outside the view lifecycle, I'm afraid you must implement your own function. Something doesn't make senseYour argument:
I also found it quite weird. Perhaps the other can explain it? |
Beta Was this translation helpful? Give feedback.
-
same issue when throttle has a scope (if there are two throttle classes inside API view and the higher one will keep getting added into cache even though the smaller throttle is blocked and not returning results) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
There doesn't seem a way to set
rate = '6/minute'
rate = '10/day'
for part of API, there is an example to do it globally, but how to do it for a specific part of API?
I've been playing with throttle code and it would be nice to have a function to check if the scope is blocked also another part that doesn't make sense is that if there are two throttle classes inside API view and the higher one will keep getting added into cache even tough the smaller throttle is blocked and not returning results.
Beta Was this translation helpful? Give feedback.
All reactions