Skip to content

Commit

Permalink
be more explicit with expires_in variable name
Browse files Browse the repository at this point in the history
indicate that it's in seconds very explicitly
  • Loading branch information
nicknisi committed Jan 16, 2025
1 parent c2f5db1 commit b7b2637
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/workos/cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ class Entry

# Initializes a new cache entry
# @param value [Object] The value to store in the cache
# @param expires_in [Integer, nil] The expiration time for the value in seconds, or nil for no expiration
def initialize(value, expires_in)
# @param expires_in_seconds [Integer, nil] The expiration time for the value in seconds, or nil for no expiration
def initialize(value, expires_in_seconds)
@value = value
@expires_at = expires_in ? Time.now + expires_in : nil
@expires_at = expires_in_seconds ? Time.now + expires_in_seconds : nil
end

# Checks if the entry has expired
Expand Down

0 comments on commit b7b2637

Please sign in to comment.