func (p *PathCache) Set(key uint32, val *PathCursor) {
	p.cache.Add(key, val)
}
Set sets a value in the cache.
package client
import (
	"github.com/hashicorp/golang-lru"
)
type PathCacheEvictHandler func(*PathCursor)
type PathCache struct {
	cache   *lru.Cache
	evictCb PathCacheEvictHandler
}
func NewPathCache(size int, evictCb PathCacheEvictHandler) *PathCache {
	c := &PathCache{evictCb: evictCb}
	cache, err := lru.NewWithEvict(size, c.onEvicted)
	if err != nil {
		panic(err)
	}
	c.cache = cache
	return c
}
func (p *PathCache) Get(key uint32) *PathCursor {
	val, ok := p.cache.Get(key)
	if !ok {
		return nil
	}
	return val.(*PathCursor)
}