func (m *memoryCache) Get(u *url.URL) (*entry, error) {
	m.Lock()
	defer m.Unlock()
	data, ok := m.Cache.Get(u.String())
	if !ok {
		return nil, fmt.Errorf("httpcache: %s not in cache", u)
	}
	return data.(*entry), nil
}
Get gets data saved for an URL if present in cache.
package httpcache
import (
	"fmt"
	"net/url"
	"sync"
	"time"
	"github.com/golang/groupcache/lru"
)
type memoryCache struct {
	sync.Mutex
	Cache *lru.Cache
}
func newMemoryCache(maxItems int) *memoryCache {
	return &memoryCache{Cache: lru.New(maxItems)}
}