decayMinutes - time within your limit will be calculated. Technically, the limit is a value with TTL (Time To Live) $decayMinutes * 60 secs in the cache, which increases with each hit. When the TTL value exceeds the value, it will be automatically destroyed in the cache, and the counting of new views will begin.
Check out the code RateLimit :: hit () . This is pretty clear:
public function hit($key, $decayMinutes = 1) { $this->cache->add( $key.':timer', $this->availableAt($decayMinutes * 60), $decayMinutes ); $added = $this->cache->add($key, 0, $decayMinutes); $hits = (int) $this->cache->increment($key); if (! $added && $hits == 1) { $this->cache->put($key, 1, $decayMinutes); } return $hits; }
If you want to limit activity to 10 beats in 5 minutes, than decayMinutes should be 5.
source share