Documentation ¶
Index ¶
- func Get(ctx context.Context, param any) (p []byte, has bool, err error)
- func Load(ctx context.Context, param any, value any) (has bool, err error)
- func New() services.Service
- func NewWithStore(store Store) services.Service
- func Remove(ctx context.Context, param interface{}) (err error)
- func Set(ctx context.Context, param interface{}, value interface{}, ttl time.Duration) (err error)
- type KeyParam
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New use @cache, and param must implement KeyParam. unit of ttl is seconds and default value is 10 seconds. @cache get @cache set 10 @cache remove @cache get-set 10
func NewWithStore ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.