func (r *Store) Set(key string, value interface{}) (Entry, bool) {
	return r.Save(key, value, false)
}
Set saves a value to the key-value storage.
Returns the entry and true if it was just inserted, meaning that
it will return the entry and a false boolean if the entry exists and it has been updated.

See `SetImmutable` and `Get`.
package memstore
import (
	"reflect"
	"strconv"
	"strings"
	"github.com/kataras/iris/core/errors"
)
type (
	Entry struct {
		Key       string
		ValueRaw  interface{}
		immutable bool  
	}
	Store []Entry
)
func (e Entry) GetByKindOrNil(k reflect.Kind) interface{} {
	switch k {
	case reflect.String:
		v := e.StringDefault("__$nf")
		if v == "__$nf" {
			return nil
		}
		return v
	case reflect.Int:
		v, err := e.IntDefault(-1)
		if err != nil || v == -1 {
			return nil
		}
		return v
	case reflect.Int64:
		v, err := e.Int64Default(-1)
		if err != nil || v == -1 {
			return nil
		}
		return v
	case reflect.Bool:
		v, err := e.BoolDefault(false)
		if err != nil {
			return nil
		}
		return v
	default:
		return e.ValueRaw
	}
}
func (e Entry) StringDefault(def string) string {
	v := e.ValueRaw
	if vString, ok := v.(string); ok {
		return vString
	}
	return def
}
func (e Entry) String() string {
	return e.StringDefault("")
}
func (e Entry) StringTrim() string {
	return strings.TrimSpace(e.String())
}
var errFindParse = errors.New("unable to find the %s with key: %s")
func (e Entry) IntDefault(def int) (int, error) {
	v := e.ValueRaw
	if v == nil {
		return def, errFindParse.Format("int", e.Key)
	}
	if vint, ok := v.(int); ok {
		return vint, nil
	} else if vstring, sok := v.(string); sok && vstring != "" {
		vint, err := strconv.Atoi(vstring)
		if err != nil {
			return def, err
		}
		return vint, nil
	}
	return def, errFindParse.Format("int", e.Key)
}
func (e Entry) Int64Default(def int64) (int64, error) {
	v := e.ValueRaw
	if v == nil {
		return def, errFindParse.Format("int64", e.Key)
	}
	if vint64, ok := v.(int64); ok {
		return vint64, nil
	}
	if vint, ok := v.(int); ok {
		return int64(vint), nil
	}
	if vstring, sok := v.(string); sok {
		return strconv.ParseInt(vstring, 10, 64)
	}
	return def, errFindParse.Format("int64", e.Key)
}
func (e Entry) Float64Default(def float64) (float64, error) {
	v := e.ValueRaw
	if v == nil {
		return def, errFindParse.Format("float64", e.Key)
	}
	if vfloat32, ok := v.(float32); ok {
		return float64(vfloat32), nil
	}
	if vfloat64, ok := v.(float64); ok {
		return vfloat64, nil
	}
	if vint, ok := v.(int); ok {
		return float64(vint), nil
	}
	if vstring, sok := v.(string); sok {
		vfloat64, err := strconv.ParseFloat(vstring, 64)
		if err != nil {
			return def, err
		}
		return vfloat64, nil
	}
	return def, errFindParse.Format("float64", e.Key)
}
func (e Entry) Float32Default(key string, def float32) (float32, error) {
	v := e.ValueRaw
	if v == nil {
		return def, errFindParse.Format("float32", e.Key)
	}
	if vfloat32, ok := v.(float32); ok {
		return vfloat32, nil
	}
	if vfloat64, ok := v.(float64); ok {
		return float32(vfloat64), nil
	}
	if vint, ok := v.(int); ok {
		return float32(vint), nil
	}
	if vstring, sok := v.(string); sok {
		vfloat32, err := strconv.ParseFloat(vstring, 32)
		if err != nil {
			return def, err
		}
		return float32(vfloat32), nil
	}
	return def, errFindParse.Format("float32", e.Key)
}
func (e Entry) BoolDefault(def bool) (bool, error) {
	v := e.ValueRaw
	if v == nil {
		return def, errFindParse.Format("bool", e.Key)
	}
	if vBoolean, ok := v.(bool); ok {
		return vBoolean, nil
	}
	if vString, ok := v.(string); ok {
		b, err := strconv.ParseBool(vString)
		if err != nil {
			return def, err
		}
		return b, nil
	}
	if vInt, ok := v.(int); ok {
		if vInt == 1 {
			return true, nil
		}
		return false, nil
	}
	return def, errFindParse.Format("bool", e.Key)
}
func (e Entry) Value() interface{} {
	if e.immutable {
		vv := reflect.Indirect(reflect.ValueOf(e.ValueRaw))
		if vv.Type().Kind() == reflect.Slice {
			newSlice := reflect.MakeSlice(vv.Type(), vv.Len(), vv.Cap())
			reflect.Copy(newSlice, vv)
			return newSlice.Interface()
		}
		if vv.Type().Kind() == reflect.Map {
			newMap := reflect.MakeMap(vv.Type())
			for _, k := range vv.MapKeys() {
				newMap.SetMapIndex(k, vv.MapIndex(k))
			}
			return newMap.Interface()
		}
		return vv.Interface()
	}
	return e.ValueRaw
}
func (r *Store) Save(key string, value interface{}, immutable bool) (Entry, bool) {
	args := *r
	n := len(args)
	for i := 0; i < n; i++ {
		kv := &args[i]
		if kv.Key == key {
			if immutable && kv.immutable {
				kv.ValueRaw = value
				kv.immutable = immutable
			} else if kv.immutable == false {
				kv.ValueRaw = value
				kv.immutable = immutable
			}
			return *kv, false
		}
	}
	c := cap(args)
	if c > n {
		args = args[:n+1]
		kv := &args[n]
		kv.Key = key
		kv.ValueRaw = value
		kv.immutable = immutable
		*r = args
		return *kv, true
	}
	kv := Entry{
		Key:       key,
		ValueRaw:  value,
		immutable: immutable,
	}
	*r = append(args, kv)
	return kv, true
}