Documentation ¶
Index ¶
- type Cache
- func (c *Cache) Clear(ctx context.Context) error
- func (c *Cache) Close(ctx context.Context) error
- func (c *Cache) Contains(ctx context.Context, key interface{}) (bool, error)
- func (c *Cache) ContainsKey(ctx context.Context, key interface{}) bool
- func (c *Cache) Data(ctx context.Context) (map[interface{}]interface{}, error)
- func (c *Cache) Get(ctx context.Context, key interface{}) (*gvar.Var, error)
- func (c *Cache) GetExpire(ctx context.Context, key interface{}) (time.Duration, error)
- func (c *Cache) GetInt(ctx context.Context, key interface{}) (int, error)
- func (c *Cache) GetMap(ctx context.Context, key interface{}) (map[string]interface{}, error)
- func (c *Cache) GetMapStrStr(ctx context.Context, key interface{}) (map[string]string, error)
- func (c *Cache) GetMapStrVar(ctx context.Context, key interface{}) (map[string]*gvar.Var, error)
- func (c *Cache) GetOrSet(ctx context.Context, key interface{}, value interface{}, ...) (*gvar.Var, error)
- func (c *Cache) GetOrSetFunc(ctx context.Context, key interface{}, f gcache.Func, duration time.Duration) (*gvar.Var, error)
- func (c *Cache) GetOrSetFuncLock(ctx context.Context, key interface{}, f gcache.Func, duration time.Duration) (*gvar.Var, error)
- func (c *Cache) GetStr(ctx context.Context, key interface{}) (string, error)
- func (c *Cache) GetVal(ctx context.Context, key interface{}) interface{}
- func (c *Cache) Keys(ctx context.Context) ([]interface{}, error)
- func (c *Cache) Remove(ctx context.Context, keys ...interface{}) (lastValue *gvar.Var, err error)
- func (c *Cache) Set(ctx context.Context, key interface{}, value interface{}, ...) error
- func (c *Cache) SetIfNotExist(ctx context.Context, key interface{}, value interface{}, ...) (bool, error)
- func (c *Cache) SetIfNotExistFunc(ctx context.Context, key interface{}, f gcache.Func, duration time.Duration) (bool, error)
- func (c *Cache) SetIfNotExistFuncLock(ctx context.Context, key interface{}, f gcache.Func, duration time.Duration) (bool, error)
- func (c *Cache) SetMap(ctx context.Context, data map[interface{}]interface{}, duration time.Duration) error
- func (c *Cache) Size(ctx context.Context) (int, error)
- func (c *Cache) Update(ctx context.Context, key interface{}, value interface{}) (oldValue *gvar.Var, exist bool, err error)
- func (c *Cache) UpdateExpire(ctx context.Context, key interface{}, duration time.Duration) (oldDuration time.Duration, err error)
- func (c *Cache) Values(ctx context.Context) ([]interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) GetMapStrStr ¶
func (*Cache) GetMapStrVar ¶
func (*Cache) GetOrSetFunc ¶
func (*Cache) GetOrSetFuncLock ¶
func (*Cache) SetIfNotExist ¶
func (*Cache) SetIfNotExistFunc ¶
func (*Cache) SetIfNotExistFuncLock ¶
func (*Cache) UpdateExpire ¶
Click to show internal directories.
Click to hide internal directories.