Class: Gitlab::ApplicationRateLimiter::BaseStrategy
- Inherits:
-
Object
- Object
- Gitlab::ApplicationRateLimiter::BaseStrategy
- Defined in:
- lib/gitlab/application_rate_limiter/base_strategy.rb
Direct Known Subclasses
IncrementPerAction, IncrementPerActionedResource, IncrementResourceUsagePerAction
Instance Method Summary collapse
-
#increment(cache_key, expiry) ⇒ Object
Increment the rate limit count and return the new count value.
-
#read(cache_key) ⇒ Object
Return the rate limit count.
Instance Method Details
#increment(cache_key, expiry) ⇒ Object
Increment the rate limit count and return the new count value
7 8 9 |
# File 'lib/gitlab/application_rate_limiter/base_strategy.rb', line 7 def increment(cache_key, expiry) raise NotImplementedError end |
#read(cache_key) ⇒ Object
Return the rate limit count. Should be 0 if there is no data in the cache.
13 14 15 |
# File 'lib/gitlab/application_rate_limiter/base_strategy.rb', line 13 def read(cache_key) raise NotImplementedError end |