Permalink
Browse files

Memoize the expires time.

  • Loading branch information...
1 parent 5e6f375 commit 40a4dd0cdf398b950742c8394b32821647de6b58 @loe committed Feb 1, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/aws/s3/authentication.rb
@@ -115,7 +115,7 @@ def initialize(*args)
# 3) The current time in seconds since the epoch plus the default number of seconds (60 seconds)
def expires
return options[:expires] if options[:expires]
- date.to_i + expires_in
+ @expires || = date.to_i + expires_in
end
def expires_in
@@ -218,4 +218,4 @@ def only_path
end
end
end
-end
+end

0 comments on commit 40a4dd0

Please sign in to comment.