func CopyHeaders(dst map[string][]string, src map[string][]string) {
	if dst == nil || src == nil {
		return
	}
	for k, vv := range src {
		v := make([]string, len(vv))
		copy(v, vv)
		dst[k] = v
	}
}
CopyHeaders clones headers "src" to "dst" .
package entry
import (
	"time"
	"github.com/kataras/iris/cache/cfg"
)
type Entry struct {
	life time.Duration
	expiresAt time.Time
	LastModified 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
}
func (e *Entry) valid() bool {
	return !time.Now().After(e.expiresAt)
}
type LifeChanger func() time.Duration
func (e *Entry) ChangeLifetime(fdur LifeChanger) {
	if e.life < cfg.MinimumCacheDuration {
		newLifetime := fdur()
		if newLifetime > e.life {
			e.life = newLifetime
		} else {
			e.life = cfg.MinimumCacheDuration
		}
	}
}