Memoization, duh

This commit is contained in:
Basti 2012-04-22 20:37:10 +02:00
parent 40cd218a5f
commit cbbf909e7f

View File

@ -4,8 +4,7 @@ module RemoteStorage
module Riak
def client
return @client if @client
@client = ::Riak::Client.new(LiquorCabinet.config['riak'].symbolize_keys)
@client ||= ::Riak::Client.new(LiquorCabinet.config['riak'].symbolize_keys)
end
def authorize_request(user, category, token)