cache

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: MIT Imports: 4 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) (*leetcode.UserProfile, error)
	SaveUserProfile(name string, isCN bool, value *leetcode.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