From e3a846e1f9a7891e4366e678fd87a7de332ed7ba Mon Sep 17 00:00:00 2001 From: Patrick Mylund Nielsen Date: Mon, 22 Dec 2014 02:47:08 -0500 Subject: [PATCH] Clarify what NoExpiration and DefaultExpiration are --- cache.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cache.go b/cache.go index 1f498ac..2beaec2 100644 --- a/cache.go +++ b/cache.go @@ -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 )