Documentation
¶
Index ¶
- Variables
- func ClearCache() (err error)
- func Delete(key string) (err error)
- func Get(key string) (value interface{}, err error)
- func GetKeys() (keys []string, err error)
- func New(options ...*cache.Option) (c cache.Cache)
- func NewOption() (op *cache.Option)
- func NewRepository(option cache.Option) internal.Repository
- func Set(key string, value interface{}) (err error)
- func Version() string
- type Cache
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // DefaultCache use for default cache client DefaultCache = New() )
Functions ¶
func ClearCache ¶
func ClearCache() (err error)
ClearCache will Clear the cache using default option
func New ¶
New will create a new cache client. If the options not set, the cache will use the default options
func NewRepository ¶
func NewRepository(option cache.Option) internal.Repository
NewRepository return the implementations of repository cache
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache represent the Cache handler
func (*Cache) ClearCache ¶
ClearCache will cleanup all the cache TODO: (bxcodec) Add Test for this function
func (*Cache) Delete ¶
Delete will remove the item from cache TODO: (bxcodec) Add Test for this function
func (*Cache) Get ¶
Get will retrieve the item from cache TODO: (bxcodec) Add Test for this function
Click to show internal directories.
Click to hide internal directories.