func (e *Entry) valid() bool {
	return !time.Now().After(e.expiresAt)
}
valid returns true if this entry's response is still valid
or false if the expiration time passed
package entry
import (
	"time"
	"github.com/geekypanda/httpcache/cfg"
)
type Entry struct {
	life time.Duration
	expiresAt time.Time
	response *Response
}
func NewEntry(duration time.Duration) *Entry {
	if duration >= 0 && duration < cfg.MinimumCacheDuration {
		duration = cfg.MinimumCacheDuration
	}
	return &Entry{
		life:     duration,
		response: &Response{},
	}
}
func (e *Entry) Response() (*Response, bool) {
	if !e.valid() {
		return nil, false
	}
	return e.response, true
}