Memoize response from `has_rate_limit?` to avoid extra API call
This commit is contained in:
parent
be9262dd95
commit
78a5de99e9
|
|
@ -86,7 +86,9 @@ module Gitlab
|
||||||
end
|
end
|
||||||
|
|
||||||
def has_rate_limit?
|
def has_rate_limit?
|
||||||
rate_limit.present?
|
return @has_rate_limit if defined?(@has_rate_limit)
|
||||||
|
|
||||||
|
@has_rate_limit = rate_limit.present?
|
||||||
end
|
end
|
||||||
|
|
||||||
def rate_limit_exceed?
|
def rate_limit_exceed?
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue