sm
/
cache
1
0
Fork 0

merge master

This commit is contained in:
Giuseppe 2015-12-03 01:20:58 +01:00
commit 3fed5bb1fe
2 changed files with 2 additions and 25 deletions

View File

@ -15,13 +15,13 @@ one) to recover from downtime quickly. (See the docs for `NewFrom()` for caveats
### Installation ### Installation
`go get github.com/pmylund/go-cache` `go get github.com/patrickmn/go-cache`
### Usage ### Usage
import ( import (
"fmt" "fmt"
"github.com/pmylund/go-cache" "github.com/patrickmn/go-cache"
"time" "time"
) )

View File

@ -1682,26 +1682,3 @@ func benchmarkLargeCache(b *testing.B, nano int) {
} }
} }
/*
func BenchmarkLargeCache(b *testing.B) {
b.StopTimer()
tc := New(time.Second, 10*time.Millisecond)
end := time.Now().Add(tc.defaultExpiration)
var i int
for time.Now().Before(end) {
tc.Set(strconv.Itoa(i), "bar", DefaultExpiration)
i++
}
for i := 0; i < 1000000; i++ {
tc.Set(strconv.Itoa(i), "bar", DefaultExpiration)
}
tc.DeleteExpired()
b.Logf("Cache size: %d", tc.ItemCount())
b.StartTimer()
for i := 1000000; i <1000000 + b.N; i++ {
tc.Set(strconv.Itoa(i), "bar", DefaultExpiration)
}
}
*/