cache

package
v0.4.15 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 4 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_manga cache.

func New

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

New to create new user_manga cache.

func (*Cache) BatchUpdate

func (c *Cache) BatchUpdate(ctx context.Context, data []entity.UserManga) (int, error)

BatchUpdate to batch update.

func (*Cache) DeleteByMangaID

func (c *Cache) DeleteByMangaID(ctx context.Context, mangaID int64) (int, error)

DeleteByMangaID to delete by manga id.

func (*Cache) DeleteNotInList

func (c *Cache) DeleteNotInList(ctx context.Context, username string, ids []int64) (int, error)

DeleteNotInList to delete not in list.

func (*Cache) Get

Get to get user manga.

func (*Cache) GetOldUsernames

func (c *Cache) GetOldUsernames(ctx context.Context) ([]string, int, error)

GetOldUsernames to get old username.

func (*Cache) IsOld

func (c *Cache) IsOld(ctx context.Context, username string) (bool, int, error)

IsOld to check if old.

Jump to

Keyboard shortcuts

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