func NewMsgCacheWithEvict(size int, onEvicted func(s *[]dns.RR)) (c *MsgCache, err error) {
	c = new(MsgCache)
	for i := 0; i < 256; i++ {
		c.lru[i], err = simplemsglru.NewLRU(size/256, simplemsglru.EvictCallback(onEvicted))
		if err != nil {
			return nil, err
		}
	}
	return c, nil
}
NewWithEvict constructs a fixed size cache with the given eviction
callback.
package cache
import (
	"github.com/hawkingrei/g53/cache/simplemsglru"
	"github.com/miekg/dns"
	"github.com/spaolacci/murmur3"
	"sync"
	"time"
)
func hashFunc(data []byte) uint64 {
	return murmur3.Sum64(data)
}
func Round(val float64) uint32 {
	if val < 0 {
		return uint32(val - 0.5)
	}
	return uint32(val + 0.5)
}
type MsgCache struct {
	lru  [256]*simplemsglru.LRU
	lock [256]sync.RWMutex
}
func NewMsgCache(size int) (*MsgCache, error) {
	return NewMsgCacheWithEvict(size, nil)
}