func (c *Cache) Oldest() (t time.Time, ok bool) {
	c.mu.RLock()
	defer c.mu.RUnlock()
	return c.oldest()
}
Oldest returns the time of the oldest item in the cache.
package lruttl
import (
	"container/list"
	"sync"
	"time"
)
type Cache struct {
	maxEntries int
	expiry     time.Duration
	ll         *list.List
	cache      map[interface{}]*list.Element
	mu         sync.RWMutex
}
func New(maxEntries int, expiry time.Duration) *Cache {
	c := Cache{
		maxEntries: maxEntries,
		expiry:     expiry,
		ll:         list.New(),
		cache:      make(map[interface{}]*list.Element),
	}
	if expiry != 0 {
		go c.expireLoop()
	}
	return &c
}
type Key interface{}
type entry struct {
	key    Key
	value  interface{}
	expiry int64
}
func newEntry(key Key, value interface{}, expiry time.Duration) *entry {
	return &entry{
		key:    key,
		value:  value,
		expiry: time.Now().Add(expiry).UnixNano(),
	}
}
func (e *entry) expiryTime() time.Time {
	return time.Unix(0, e.expiry)
}
func (e *entry) expired() bool {
	return time.Now().UnixNano() > e.expiry
}
func (e *entry) touch(expiry time.Duration) {
	e.expiry = time.Now().Add(expiry).UnixNano()
}
func (c *Cache) Len() int {
	c.mu.RLock()
	defer c.mu.RUnlock()
	return c.len()
}