Documentation
¶
Index ¶
- func AsClient(client interface{}) *cove.Cache
- func New() cache.Cache
- type SQLiteCacher
- func (c *SQLiteCacher) Client() interface{}
- func (c *SQLiteCacher) Close() error
- func (c *SQLiteCacher) Codec() encoding.Codec
- func (c *SQLiteCacher) Decr(ctx context.Context, key string) error
- func (c *SQLiteCacher) Delete(ctx context.Context, key string) error
- func (c *SQLiteCacher) Flush(ctx context.Context) error
- func (c *SQLiteCacher) Get(ctx context.Context, key string, value interface{}) error
- func (c *SQLiteCacher) Incr(ctx context.Context, key string) error
- func (c *SQLiteCacher) IsExist(ctx context.Context, key string) (bool, error)
- func (c *SQLiteCacher) Name() string
- func (c *SQLiteCacher) Put(ctx context.Context, key string, val interface{}, expire int64) error
- func (c *SQLiteCacher) SetCodec(codec encoding.Codec)
- func (c *SQLiteCacher) StartAndGC(ctx context.Context, opt cache.Options) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SQLiteCacher ¶
SQLiteCacher represents a SQLite cache adapter implementation.
func (*SQLiteCacher) Client ¶
func (c *SQLiteCacher) Client() interface{}
func (*SQLiteCacher) Close ¶
func (c *SQLiteCacher) Close() error
func (*SQLiteCacher) Codec ¶
func (c *SQLiteCacher) Codec() encoding.Codec
func (*SQLiteCacher) Decr ¶
func (c *SQLiteCacher) Decr(ctx context.Context, key string) error
Decr cached int value.
func (*SQLiteCacher) Delete ¶
func (c *SQLiteCacher) Delete(ctx context.Context, key string) error
Delete deletes cached value by given key.
func (*SQLiteCacher) Flush ¶
func (c *SQLiteCacher) Flush(ctx context.Context) error
Flush deletes all cached data.
func (*SQLiteCacher) Get ¶
func (c *SQLiteCacher) Get(ctx context.Context, key string, value interface{}) error
Get gets cached value by given key.
func (*SQLiteCacher) Incr ¶
func (c *SQLiteCacher) Incr(ctx context.Context, key string) error
Incr increases cached int-type value by given key as a counter.
func (*SQLiteCacher) Name ¶
func (c *SQLiteCacher) Name() string
func (*SQLiteCacher) Put ¶
Put puts value into cache with key and expire time. If expired is 0, it will be deleted by next GC operation.
func (*SQLiteCacher) SetCodec ¶
func (c *SQLiteCacher) SetCodec(codec encoding.Codec)
func (*SQLiteCacher) StartAndGC ¶
StartAndGC starts GC routine based on config string settings.
Click to show internal directories.
Click to hide internal directories.