cache

package
v0.6.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// DefaultExpirationTime default expiration time
	DefaultExpirationTime = 15 * time.Minute

	NoExpiration = gocache.NoExpiration
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	GetUserProfile(name string, isCN bool) (*models.UserProfile, error)
	SaveUserProfile(name string, isCN bool, value *models.UserProfile, timeout time.Duration) error

	GetFollow(name string, isCN bool) (*leetcode.FollowInfo, error)
	SaveFollow(name string, isCN bool, value *leetcode.FollowInfo, timeout time.Duration) error

	GetHistoryRecord(name string, isCN bool, start, end time.Time) ([]storage.HistoryRecord, error)
	SaveHistoryRecord(name string, isCN bool, start, end time.Time, info []storage.HistoryRecord, timeout time.Duration) error

	SaveByteBody(name string, body []byte, timeout time.Duration) error
	GetByteBody(name string) ([]byte, error)
}

Cache cache

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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