func (c *cache) Items() map[string]Item {
	c.mu.RLock()
	defer c.mu.RUnlock()
	m := make(map[string]Item, len(c.items))
	now := time.Now().UnixNano()
	for k, v := range c.items {
		// "Inlining" of Expired
		if v.Expiration > 0 {
			if now > v.Expiration {
				continue
			}
		}
		m[k] = v
	}
	return m
}
func (c *cache) Items() map[string]Item {
	c.mu.RLock()
	defer c.mu.RUnlock()
	m := make(map[string]Item, len(c.items))
	now := time.Now().UnixNano()
	for k, v := range c.items {
		// "Inlining" of Expired
		if v.Expiration > 0 {
			if now > v.Expiration {
				continue
			}
		}
		m[k] = v
	}
	return m
}
func ( c * cache ) Items ( ) map [ string ] Item { c . mu . RLock ( ) defer c . mu . RUnlock ( ) m := make ( map [ string ] Item , len ( c . items ) ) now := time . Now ( ) . UnixNano ( ) for k , v := range c . items { // "Inlining" of Expired if v . Expiration > 0 { if now > v . Expiration { continue } } m [ k ] = v } return m }
// Copies all unexpired items in the cache into a new map and returns it.
Copies all unexpired items in the cache into a new map and returns it .