lower cache min limit (#2065)

This commit is contained in:
Chris O'Haver
2018-08-29 02:13:18 -04:00
committed by Miek Gieben
parent a21755479d
commit 684c35d56b
2 changed files with 17 additions and 6 deletions

View File

@@ -31,8 +31,8 @@ type shard struct {
// New returns a new cache.
func New(size int) *Cache {
ssize := size / shardSize
if ssize < 512 {
ssize = 512
if ssize < 4 {
ssize = 4
}
c := &Cache{}