sm
/
cache
1
0
Fork 0
This commit is contained in:
Patrick Mylund Nielsen 2014-12-22 02:48:52 -05:00
parent e3a846e1f9
commit 8a2f4f19ef
2 changed files with 3 additions and 3 deletions

View File

@ -25,7 +25,7 @@ func (item *Item) Expired() bool {
const ( const (
// For use with functions that take an expiration time. // For use with functions that take an expiration time.
NoExpiration time.Duration = -1 NoExpiration time.Duration = -1
// For use with functions that take an expiration time. Equivalent to // For use with functions that take an expiration time. Equivalent to
// passing in the same expiration duration as was given to New() or // passing in the same expiration duration as was given to New() or
// NewFrom() when the cache was created (e.g. 5 minutes.) // NewFrom() when the cache was created (e.g. 5 minutes.)

View File

@ -109,11 +109,11 @@ func TestCacheTimes(t *testing.T) {
func TestNewFrom(t *testing.T) { func TestNewFrom(t *testing.T) {
m := map[string]*Item{ m := map[string]*Item{
"a": &Item{ "a": &Item{
Object: 1, Object: 1,
Expiration: nil, Expiration: nil,
}, },
"b": &Item{ "b": &Item{
Object: 2, Object: 2,
Expiration: nil, Expiration: nil,
}, },
} }