Memoize Akismet client initialization on AkismetHelper

parent eefc46e0
...@@ -5,7 +5,7 @@ module Gitlab ...@@ -5,7 +5,7 @@ module Gitlab
end end
def akismet_client def akismet_client
::Akismet::Client.new(current_application_settings.akismet_api_key, @akismet_client ||= ::Akismet::Client.new(current_application_settings.akismet_api_key,
Gitlab.config.gitlab.url) Gitlab.config.gitlab.url)
end end
......
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