// GetTime returns a time representation of the value for the given key.
// will error if the type is not an time.Time.
GetTime returns a time representation of the value for the given key.
will error if the type is not an time.Time.
// GetTime returns a time representation of the value for the given key . // will error if the type is not an time . Time .
func (c *BaseCache) GetTime(k cache.Key) (time.Time, error) {
	value, err := c.Get(k)
	if err != nil {
		return defaultZeroTime, err
	}
	v, ok := value.(time.Time)
	if !ok {
		return defaultZeroTime, fmt.Errorf("not a string value. key=%s, value=%v(%T)", k.Key(), value, value)
	}
	return v, nil
}
func ( c * BaseCache ) GetTime ( k cache . Key ) ( time . Time , error ) { value , err := c . Get ( k ) if err != nil { return defaultZeroTime , err } v , ok := value . ( time . Time ) if ! ok { return defaultZeroTime , fmt . Errorf ( " " , k . Key ( ) , value , value ) } return v , nil }
GetTime returns a time representation of the value for the given key.
GetTime returns a time representation of the value for the given key .