Clarify what NoExpiration and DefaultExpiration are

This commit is contained in:
Patrick Mylund Nielsen 2014-12-22 02:47:08 -05:00
parent a1dd6b7fff
commit e3a846e1f9
1 changed files with 4 additions and 0 deletions

View File

@ -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
)