$now, 'hits' => 0]; } if ($state['hits'] >= $limit) { return false; } $state['hits']++; Cache::write($key, $state, 'throttle'); return true; } }