Skip to content

Commit

Permalink
add docstring comment to Entry constructor
Browse files Browse the repository at this point in the history
- specify the time increment (seconds)
  • Loading branch information
nicknisi committed Jan 16, 2025
1 parent 87e28cd commit 2f20578
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/workos/cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ module Cache
class Entry
attr_reader :value, :expires_at

# 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)
@value = value
@expires_at = expires_in ? Time.now + expires_in : nil
Expand Down

0 comments on commit 2f20578

Please sign in to comment.