Class: Gitlab::ApplicationRateLimiter::BaseStrategy

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/application_rate_limiter/base_strategy.rb

Instance Method Summary collapse

Instance Method Details

#increment(cache_key, expiry) ⇒ Object

Increment the rate limit count and return the new count value

Raises:

  • (NotImplementedError)


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.

Raises:

  • (NotImplementedError)


13
14
15
# File 'lib/gitlab/application_rate_limiter/base_strategy.rb', line 13

def read(cache_key)
  raise NotImplementedError
end