Stiphle\Throttle\TimeWindow::getStorageKey PHP Метод

getStorageKey() защищенный Метод

Get storage key
protected getStorageKey ( string $key, integer $limit, integer $milliseconds ) : string
$key string - A unique key for what we're throttling
$limit integer - How many are allowed
$milliseconds integer - In this many milliseconds
Результат string
    protected function getStorageKey($key, $limit, $milliseconds)
    {
        $window = $milliseconds * floor(microtime(1) * 1000 / $milliseconds);
        $date = date('YmdHis', $window / 1000);
        return $date . '::' . $key . '::' . $limit . '::' . $milliseconds . '::COUNT';
    }