Action throttling with memcache

Attached is a decent way of throttling user actions without storing a complete log of activity. All we do is store when the user last did something and how tired we are of seeing that user. When the user makes a second request, we throttle the user less based on the amount of time that’s passed.

I’d argue that this is a better way of doing it than WordPress’ default check_comment_flood_db function, as it allows occasional bursts of activity.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>