cache

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

Cache contains functions for user cache.

func New

func New(cacher cache.Cacher, repo repository.Repository) *Cache

New to create new user cache.

func (*Cache) GetByID

func (c *Cache) GetByID(ctx context.Context, id int64) (data *entity.User, code int, err error)

GetByID to get data by id.

func (*Cache) Upsert

func (c *Cache) Upsert(ctx context.Context, data entity.User) (int, error)

Upsert to upsert.

Jump to

Keyboard shortcuts

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