v1.0.0
English

Throttler.php

system/Throttle/Throttler.php
1 class 6 methods

class Throttler

Class Throttler Uses an implementation of the Token Bucket algorithm to implement a "rolling window" type of throttling that can be used for rate limiting an API or any other request. Each "token" in the "bucket" is equivalent to a single request for the purposes of this implementation.
__construct (CacheInterface $cache) public
getTokenTime () public
check (string $key, int $capacity, int $seconds, int $cost = 1) public
remove (string $key) public
setTestTime (int $time) public
time () public
phpDG v1.0.0 Throttler.php 662 files 498 classes 763 fn
Generated