Documentation
¶
Index ¶
- type Memory
- func (c *Memory) Del(ctx context.Context, key string) error
- func (c *Memory) Exists(ctx context.Context, key string) bool
- func (c *Memory) ExpiresAt(ctx context.Context, key string, expiresAt time.Time) error
- func (c *Memory) ExpiresIn(ctx context.Context, key string, ttl time.Duration) error
- func (c *Memory) Get(ctx context.Context, key string, obj any) error
- func (c *Memory) GetSet(ctx context.Context, key string, ttl time.Duration, obj any, ...) error
- func (c *Memory) Set(ctx context.Context, key string, value any, ttl time.Duration) error
- type None
- func (c *None) Del(ctx context.Context, key string) error
- func (c *None) Exists(ctx context.Context, key string) bool
- func (c *None) ExpiresAt(ctx context.Context, key string, expiresAt time.Time) error
- func (c *None) ExpiresIn(ctx context.Context, key string, ttl time.Duration) error
- func (c *None) Get(ctx context.Context, key string, obj any) error
- func (c *None) GetSet(ctx context.Context, key string, ttl time.Duration, obj any, ...) error
- func (c *None) Set(ctx context.Context, key string, value any, ttl time.Duration) error
- type Redis
- func (c *Redis) Del(ctx context.Context, key string) error
- func (c *Redis) Exists(ctx context.Context, key string) bool
- func (c *Redis) ExpiresAt(ctx context.Context, key string, expiresAt time.Time) error
- func (c *Redis) ExpiresIn(ctx context.Context, key string, ttl time.Duration) error
- func (c *Redis) Get(ctx context.Context, key string, obj any) error
- func (c *Redis) GetSet(ctx context.Context, key string, ttl time.Duration, obj any, ...) error
- func (c *Redis) Set(ctx context.Context, key string, value any, ttl time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
type None ¶
type None struct {
}
func NewCacheNone ¶
func NewCacheNone() *None
Click to show internal directories.
Click to hide internal directories.