Kepler core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

23 lines
553 B

package kv
const DefaultExpireVal int64 = 1800
type KV interface {
Keys(p string) ([]string, error)
// Get Cached bytes via k, return empty bytes and false if failed.
Get(k string) ([]byte, error)
// Set bytes to cache with given key
Set(k string, d []byte, x ...int64) error
//
GetJSON(k string, o interface{}) error
//
SetJSON(k string, v interface{}, x ...int64) error
//
GetBSON(k string, o interface{}) error
//
SetBSON(k string, v interface{}, x ...int64) error
//
Del(k ...string) error
//
Expire(k string, x ...int64) error
}