Throttle
class Throttle (View source)
Constants
PREFIX |
Prefix untuk cache milik throttle. |
Methods
static bool
exceeded(int $max_attempts, int $decay_minutes)
Cek apakah request telah melebihi batas yang ditentukan.
static string
key()
Ambil cache key untuk throtler.
Details
static Response
check(int $max_attempts, int $decay_minutes = 1)
Jalankan proses throttling.
static bool
exceeded(int $max_attempts, int $decay_minutes)
Cek apakah request telah melebihi batas yang ditentukan.
static string
key()
Ambil cache key untuk throtler.
static Response
error()
Kirim response error ke klien.