Common fn for rate limiting
Merge pull request #489 from guardian/clicktrap

Common fn for rate limiting