Skip to content

Commit

Permalink
Clarify what NoExpiration and DefaultExpiration are
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickmn committed Dec 22, 2014
1 parent a1dd6b7 commit e3a846e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ func (item *Item) Expired() bool {
}

const (
// For use with functions that take an expiration time.
NoExpiration time.Duration = -1
// For use with functions that take an expiration time. Equivalent to
// passing in the same expiration duration as was given to New() or
// NewFrom() when the cache was created (e.g. 5 minutes.)
DefaultExpiration time.Duration = 0
)

Expand Down

0 comments on commit e3a846e

Please sign in to comment.