Documentation ¶
Index ¶
Constants ¶
View Source
const ( // NumInstance is number of instance NumInstance = 5 // PurgeExpiredTime is time to purge cache PurgeExpiredTime = 10 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CacheInstance ¶
type CacheInstance interface { Set(key string, value interface{}, expired time.Duration) error Get(key string) (interface{}, bool) Del(key string) error DelBulk(key string) error CloseConnect() error }
CacheInstance interface
type GoCacheClient ¶
type GoCacheClient struct {
// contains filtered or unexported fields
}
GoCacheClient struct
func NewGoCacheClient ¶
func NewGoCacheClient(ctx context.Context) *GoCacheClient
NewGoCacheClient creates a new GoCacheClient
func (*GoCacheClient) CloseConnect ¶
func (cc *GoCacheClient) CloseConnect() error
CloseConnect close connection
func (*GoCacheClient) DelBulk ¶
func (cc *GoCacheClient) DelBulk(key string) error
DelBulk bulk deletes from cache
func (*GoCacheClient) Get ¶
func (cc *GoCacheClient) Get(key string) (interface{}, bool)
Get gets from cache
Click to show internal directories.
Click to hide internal directories.