/home/techb158/immovalet.com/vendor/laravel/framework/src/Illuminate/Cache
NameSizeModeActions
Console/-0755rm
Events/-0755rm
RateLimiting/-0755rm
ApcStore.php25860644editdlrm
ApcWrapper.php18980644editdlrm
ArrayLock.php20800644editdlrm
ArrayStore.php46610644editdlrm
CacheLock.php18530644editdlrm
CacheManager.php106500644editdlrm
CacheServiceProvider.php11880644editdlrm
composer.json13060644editdlrm
DatabaseLock.php36400644editdlrm
DatabaseStore.php103530644editdlrm
DynamoDbLock.php14860644editdlrm
DynamoDbStore.php148330644editdlrm
FileStore.php83670644editdlrm
HasCacheLock.php6810644editdlrm
LICENSE.md10750644editdlrm
Lock.php35470644editdlrm
LuaScripts.php4620644editdlrm
MemcachedConnector.php23820644editdlrm
MemcachedLock.php14530644editdlrm
MemcachedStore.php63260644editdlrm
NoLock.php6920644editdlrm
NullStore.php24080644editdlrm
PhpRedisLock.php31210644editdlrm
RateLimiter.php35300644editdlrm
RedisLock.php17940644editdlrm
RedisStore.php81680644editdlrm
RedisTaggedCache.php47770644editdlrm
Repository.php161740644editdlrm
RetrievesMultipleKeys.php11550644editdlrm
TaggableStore.php4210644editdlrm
TaggedCache.php25320644editdlrm
TagSet.php21500644editdlrm
Edit: /home/techb158/immovalet.com/vendor/laravel/framework/src/Illuminate/Cache/RateLimiter.php (3530B)
cache = $cache; } /** * Register a named limiter configuration. * * @param string $name * @param \Closure $callback * @return $this */ public function for(string $name, Closure $callback) { $this->limiters[$name] = $callback; return $this; } /** * Get the given named rate limiter. * * @param string $name * @return \Closure */ public function limiter(string $name) { return $this->limiters[$name] ?? null; } /** * Determine if the given key has been "accessed" too many times. * * @param string $key * @param int $maxAttempts * @return bool */ public function tooManyAttempts($key, $maxAttempts) { if ($this->attempts($key) >= $maxAttempts) { if ($this->cache->has($key.':timer')) { return true; } $this->resetAttempts($key); } return false; } /** * Increment the counter for a given key for a given decay time. * * @param string $key * @param int $decaySeconds * @return int */ public function hit($key, $decaySeconds = 60) { $this->cache->add( $key.':timer', $this->availableAt($decaySeconds), $decaySeconds ); $added = $this->cache->add($key, 0, $decaySeconds); $hits = (int) $this->cache->increment($key); if (! $added && $hits == 1) { $this->cache->put($key, 1, $decaySeconds); } return $hits; } /** * Get the number of attempts for the given key. * * @param string $key * @return mixed */ public function attempts($key) { return $this->cache->get($key, 0); } /** * Reset the number of attempts for the given key. * * @param string $key * @return mixed */ public function resetAttempts($key) { return $this->cache->forget($key); } /** * Get the number of retries left for the given key. * * @param string $key * @param int $maxAttempts * @return int */ public function retriesLeft($key, $maxAttempts) { $attempts = $this->attempts($key); return $maxAttempts - $attempts; } /** * Clear the hits and lockout timer for the given key. * * @param string $key * @return void */ public function clear($key) { $this->resetAttempts($key); $this->cache->forget($key.':timer'); } /** * Get the number of seconds until the "key" is accessible again. * * @param string $key * @return int */ public function availableIn($key) { return max(0, $this->cache->get($key.':timer') - $this->currentTime()); } }