Documentation ¶
Index ¶
- Constants
- func Bool(key string, def bool) bool
- func Clear(match string)
- func Del(key string) bool
- func Get(key string, def string) (string, error)
- func Int(key string, def int64) int64
- func Item(key string) (js.Item, error)
- func Items(key string) (js.Items, error)
- func Json(key string) (js.Json, error)
- func Keys() []string
- func Len() int
- func Load() error
- func More(key string, expiration time.Duration) int64
- func Num(key string, def float64) float64
- func Set(key string, value interface{}, expiration time.Duration) interface{}
- func SetD(key string, value interface{}) interface{}
- func SetH(key string, value interface{}) interface{}
- func SetM(key string, value interface{}) interface{}
- func SetW(key string, value interface{}) interface{}
- func Time(key string, def time.Time) time.Time
- func Type() string
- func Values() []string
- type Cache
- type TpCahe
Constants ¶
const MSG_CACHE_NOT_FOUND = "Cache not found"
Variables ¶
This section is empty.
Functions ¶
func Bool ¶ added in v0.0.3
* * Bool return a bool from cache * @param key string * @param def bool * @return bool *
func Get ¶
* * SetY a value in cache for one year * @param key string * @param value interface{} * @return interface{} *
func Int ¶ added in v0.0.3
* * Int return a int from cache * @param key string * @param def int * @return int *
func Item ¶ added in v0.0.3
* * Item return a item object from cache * @param key string * @return js.Item * @return error *
func Items ¶ added in v0.0.3
* * Items return a items object from cache * @param key string * @return js.Items * @return error *
func Json ¶ added in v0.0.3
* * Json return a json object from cache * @param key string * @return js.Json * @return error *
func More ¶ added in v0.0.3
* * Count the number of keys in cache * @param key string * @param expiration time.Duration * @return int *
func Num ¶ added in v0.0.3
* * Num return a float64 from cache * @param key string * @param def float64 * @return float64 *
func Set ¶
* * Set a value in cache * @param key string * @param value string * @param expiration time.Duration * @return string *
func SetD ¶ added in v0.0.3
func SetD(key string, value interface{}) interface{}
* * SetD a value in cache for one day * @param key string * @param value interface{} * @return interface{} *
func SetH ¶ added in v0.0.3
func SetH(key string, value interface{}) interface{}
* * SetH a value in cache for one hour * @param key string * @param value interface{} * @return interface{} *
func SetM ¶ added in v0.0.3
func SetM(key string, value interface{}) interface{}
* * SetM a value in cache for one month * @param key string * @param value interface{} * @return interface{} *
func SetW ¶ added in v0.0.3
func SetW(key string, value interface{}) interface{}
* * SetW a value in cache for one week * @param key string * @param value interface{} * @return interface{} *