Documentation
¶
Index ¶
- func Load(memCache *Cache, filePath string) error
- func Save(memCache *Cache, filePath string) error
- type Cache
- func (c *Cache) Decrease(ctx context.Context, key string, value int64) (data int64, err error)
- func (c *Cache) Del(ctx context.Context, Key string) error
- func (c *Cache) Flush(ctx context.Context) error
- func (c *Cache) GetInt64(ctx context.Context, key string) (data int64, exist bool, err error)
- func (c *Cache) GetString(ctx context.Context, key string) (data string, exist bool, err error)
- func (c *Cache) Increase(ctx context.Context, key string, value int64) (data int64, err error)
- func (c *Cache) SetInt64(ctx context.Context, key string, value int64, ttl time.Duration) error
- func (c *Cache) SetString(ctx context.Context, key, value string, ttl time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache basic memory cache
Click to show internal directories.
Click to hide internal directories.