cache

package
v0.0.0-...-1512f51 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheAdapter

type CacheAdapter struct {
	// contains filtered or unexported fields
}

CacheAdapter impl CachePort defined in use case package

func NewCacheAdapter

func NewCacheAdapter(client *redis.Client) *CacheAdapter

func (*CacheAdapter) GetCartCache

func (c *CacheAdapter) GetCartCache(ctx context.Context, key string) (string, error)

GetCartCache 获得购物车缓存

func (*CacheAdapter) IsKeyExist

func (c *CacheAdapter) IsKeyExist(ctx context.Context, key string) bool

IsKeyExist will check if key exist

func (*CacheAdapter) SetCartCache

func (c *CacheAdapter) SetCartCache(ctx context.Context, key string, cart string) error

SetCartCache 将购物车存入redis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL