merge master
This commit is contained in:
commit
3fed5bb1fe
|
@ -15,13 +15,13 @@ one) to recover from downtime quickly. (See the docs for `NewFrom()` for caveats
|
|||
|
||||
### Installation
|
||||
|
||||
`go get github.com/pmylund/go-cache`
|
||||
`go get github.com/patrickmn/go-cache`
|
||||
|
||||
### Usage
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/pmylund/go-cache"
|
||||
"github.com/patrickmn/go-cache"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue