RateLimit 0,0,0,1,0 travis-ci ruby CocoaPods

Simple utility for only executing code every so often.

Rate Limit

Version Build Status Carthage compatible CocoaPods compatible

Simple utility for only executing code every so often.

This will only execute the block passed for a given name if the last time it was called is greater than limit or it has never been called.

This is really handy for refreshing stuff in viewDidAppear: but preventing it from happening a ton if it was just refreshed.

Rate Limit is fully thread-safe. Released under the MIT license.

Usage

RateLimit.execute(name: "RefreshTimeline", limit: 60) {
    // Do some work that runs a maximum of once per minute
}

Rate Limit doesn’t persist limts across application launches. For most cases, this is ideal. If you need persistence, simply replace RateLimit with PersistentRateLimit for on disk persistence. Easy as that.

Open up the included Xcode project for an example app and tests. See the code for full documentation.

Installation

Simply add the files in the RateLimit directory to your project or add RateLimit to your Podfile if you’re using CocoaPods.

Related Repositories

RateLimit

RateLimit

Simple utility for only executing code every so often. ...

hellcat

hellcat

netcat that takes unfair advantage of traffic shaping systems that don't initially ratelimit ...

django-ratelimit

django-ratelimit

Cache-based rate-limiting for Django ...

ratelimit

ratelimit

A Golang blocking leaky-bucket rate limit implementation ...

django-ratelimit-backend

django-ratelimit-backend

Rate-limit your login attempts at the authentication backend level ...


Top Contributors

soffes JaviSoto calebd streeter carlj hyperspacemark

Releases

-   v1.3.0 zip tar
-   v1.2.2 zip tar
-   v1.2.1 zip tar
-   v1.2.0 zip tar
-   v1.1.1 zip tar
-   v1.1.0 zip tar
-   v1.0.1 zip tar
-   v1.0.0 zip tar
-   v0.2.1 zip tar
-   v0.2.0 zip tar
-   v0.1.0 zip tar