class Throttle (View source)

Constants

PREFIX

Prefix untuk cache milik throttle.

Methods

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.

Details

static Response check(int $max_attempts, int $decay_minutes = 1)

Jalankan proses throttling.

Parameters

int $max_attempts
int $decay_minutes

Return Value

Response

static bool exceeded(int $max_attempts, int $decay_minutes)

Cek apakah request telah melebihi batas yang ditentukan.

Parameters

int $max_attempts
int $decay_minutes

Return Value

bool

static string key()

Ambil cache key untuk throtler.

Return Value

string

static Response error()

Kirim response error ke klien.

Return Value

Response