sm
/
cache
1
0
Fork 0

Refer to DeleteExpired as c.DeleteExpired()

This commit is contained in:
Patrick Mylund Nielsen 2014-12-22 02:06:10 -05:00
parent 888f396121
commit 887753fa90
1 changed files with 2 additions and 2 deletions

View File

@ -990,7 +990,7 @@ func newCacheWithJanitor(de time.Duration, ci time.Duration, m map[string]*Item)
// interval. If the expiration duration is less than one (or NoExpiration),
// the items in the cache never expire (by default), and must be deleted
// manually. If the cleanup interval is less than one, expired items are not
// deleted from the cache before calling DeleteExpired.
// deleted from the cache before calling c.DeleteExpired().
func New(defaultExpiration, cleanupInterval time.Duration) *Cache {
items := make(map[string]*Item)
return newCacheWithJanitor(defaultExpiration, cleanupInterval, items)
@ -1000,7 +1000,7 @@ func New(defaultExpiration, cleanupInterval time.Duration) *Cache {
// interval. If the expiration duration is less than one (or NoExpiration),
// the items in the cache never expire (by default), and must be deleted
// manually. If the cleanup interval is less than one, expired items are not
// deleted from the cache before calling DeleteExpired.
// deleted from the cache before calling c.DeleteExpired().
//
// NewFrom also accepts an items map which will serve as the underlying map
// for the cache. This is useful for deserializing a cache (serialized using