Documentation ¶
Overview ¶
Package sdcacheristretto 使用ristretto实现的cache
Index ¶
- type Cache
- func (c *Cache) Clear(ctx context.Context) error
- func (c *Cache) Delete(ctx context.Context, k any) error
- func (c *Cache) Get(ctx context.Context, k any) (any, error)
- func (c *Cache) GetOrPut(ctx context.Context, k any, ...) (any, error)
- func (c *Cache) GetTTL(ctx context.Context, k any) (time.Duration, error)
- func (c *Cache) Put(ctx context.Context, k, v any, opts *sdcache.PutOptions) error
- func (c *Cache) Ristretto() *ristretto.Cache
- func (c *Cache) SetCost(cost int64) *Cache
- func (c *Cache) SetKey(key sdcache.Key) *Cache
- func (c *Cache) SetTTL(ttl time.Duration) *Cache
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.