Skip to content

Commit

Permalink
Memoize the expires time.
Browse files Browse the repository at this point in the history
  • Loading branch information
loe committed Feb 1, 2012
1 parent 5e6f375 commit 40a4dd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/aws/s3/authentication.rb
Expand Up @@ -115,7 +115,7 @@ def initialize(*args)
# 3) The current time in seconds since the epoch plus the default number of seconds (60 seconds) # 3) The current time in seconds since the epoch plus the default number of seconds (60 seconds)
def expires def expires
return options[:expires] if options[:expires] return options[:expires] if options[:expires]
date.to_i + expires_in @expires || = date.to_i + expires_in
end end


def expires_in def expires_in
Expand Down Expand Up @@ -218,4 +218,4 @@ def only_path
end end
end end
end end
end end

0 comments on commit 40a4dd0

Please sign in to comment.