cache

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildAccessPermissionKey

func BuildAccessPermissionKey(ctx context.Context) (string, error)

func BuildAccessTokenKey

func BuildAccessTokenKey(userID int32) string

func BuildCategoryPermissionKey

func BuildCategoryPermissionKey(categoryID int32) string

func BuildCodeCacheKey

func BuildCodeCacheKey(userID int32) string

func BuildRefreshTokenKey

func BuildRefreshTokenKey(userID int32) string

func BuildTokenAccessKey

func BuildTokenAccessKey(accessToken string) string

func BuildTokenRefreshKey

func BuildTokenRefreshKey(refreshToken string) string

Types

type Cache

type Cache interface {
	SetDefault(key string, value interface{})
	Set(key string, value interface{}, expiration time.Duration)
	Get(key string) (interface{}, bool)
	Delete(key string)
	BatchDelete(keys []string)
}

func NewCache

func NewCache() Cache

Jump to

Keyboard shortcuts

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