mirror of https://github.com/rjbasitali/go-cache
parent
3e79112696
commit
f68be2a82a
|
|
@ -1,7 +1,6 @@
|
||||||
package gocache
|
package gocache
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"runtime"
|
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
@ -31,7 +30,7 @@ func NewCacheWithSweeper(interval, expireAfter time.Duration,
|
||||||
|
|
||||||
if interval > 0 && expireAfter > 0 {
|
if interval > 0 && expireAfter > 0 {
|
||||||
s := newSweeper(c, interval)
|
s := newSweeper(c, interval)
|
||||||
runtime.SetFinalizer(c, s.stopSweeper)
|
// runtime.SetFinalizer(c, s.stopSweeper)
|
||||||
go s.run(c)
|
go s.run(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue