Merge pull request #554 from fkautz/pr_out_disable_eviction_on_0_expiration_time

This commit is contained in:
Frederick F. Kautz IV 2015-04-30 19:40:46 -07:00
commit e911cc332e
1 changed files with 3 additions and 1 deletions

View File

@ -85,7 +85,9 @@ func Start(maxSize uint64, expiration time.Duration) (chan<- string, <-chan erro
memory.objects.OnEvicted = memory.evictObject
// set up memory expiration
go memory.expireLRUObjects()
if expiration > 0 {
go memory.expireLRUObjects()
}
go start(ctrlChannel, errorChannel)
return ctrlChannel, errorChannel, memory