func NewCacheDegree(degree int) (ce *Cache) {
	ce = &Cache{
		done:   make(chan struct{}),
		qu:     make(chan *item, 1024),
		degree: degree,
	}
	ce.Flush()
	go ce.queueWorker()
	return
}
NewCacheDegree returns a new Cache given degree.
package cache
import (
	"sync"
	"github.com/google/btree"
)
var (
	DefaultDegree = 4
)
type Cache struct {
	done   chan struct{}
	tr     *btree.BTree
	trMu   sync.RWMutex
	qu     chan *item
	degree int
}
func NewCache() (ce *Cache) {
	return NewCacheDegree(DefaultDegree)
}