On Wed, Feb 25, 2015 at 12:42 AM, Warren Young <wyml@etr-usa.com> wrote:
On Feb 24, 2015, at 6:21 AM, Sawyer X <xsawyerx@gmail.com> wrote:
"Delayed respones": https://metacpan.org/pod/distribution/Dancer2/lib/Dancer2/Manual.pod#Delayed....
We will provide more examples in the near future.
Wow! That one feature might be enough to get me to switch to Dancer 2.
I would like to use it to implement a login throttling mechanism. Something like, “Aha, this guy has attempted to log in more than 5 times in the past minute; I’m going to sleep for a few seconds before I answer." Is that an appropriate use for this feature?
Sure. You would keep a watcher and have every request noted there with the IP so you could decide if someone's hitting the server. You would need to clean up the cache for that. You could use CHI for it. :)