lib/workingsetcache: fix outdated comments for Load() and New() functions

This commit is contained in:
Aliaksandr Valialkin 2023-10-25 09:25:28 +02:00
parent c07909a20b
commit 305c96e384
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1

View file

@ -56,7 +56,7 @@ type Cache struct {
} }
// Load loads the cache from filePath and limits its size to maxBytes // Load loads the cache from filePath and limits its size to maxBytes
// and evicts inactive entries in 20 minutes. // and evicts inactive entries in *cacheExpireDuration minutes.
// //
// Stop must be called on the returned cache when it is no longer needed. // Stop must be called on the returned cache when it is no longer needed.
func Load(filePath string, maxBytes int) *Cache { func Load(filePath string, maxBytes int) *Cache {
@ -88,7 +88,7 @@ func loadWithExpire(filePath string, maxBytes int, expireDuration time.Duration)
return newCacheInternal(curr, prev, whole, maxBytes) return newCacheInternal(curr, prev, whole, maxBytes)
} }
// New creates new cache with the given maxBytes capacity. // New creates new cache with the given maxBytes capacity and *cacheExpireDuration expiration.
// //
// Stop must be called on the returned cache when it is no longer needed. // Stop must be called on the returned cache when it is no longer needed.
func New(maxBytes int) *Cache { func New(maxBytes int) *Cache {