Commit 78a5de99 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre
Browse files

Memoize response from `has_rate_limit?` to avoid extra API call

parent fee872f7c56e
......@@ -86,7 +86,9 @@ def rate_limit
end
def has_rate_limit?
rate_limit.present?
return @has_rate_limit if defined?(@has_rate_limit)
@has_rate_limit = rate_limit.present?
end
def rate_limit_exceed?
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment