cache

package
v0.0.0-...-e8c1540 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2018 License: BSD-3-Clause Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const (
	TTL = 60 * 60 * 24 // 1 day = 24 hours = 84600 seconds
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	*leveldb.DB
}

func InitCacheDB

func InitCacheDB() (cache *Cache, err error)

func (*Cache) DeleteKV

func (cache *Cache) DeleteKV(userID, dbID, taskID int) (err error)

func (*Cache) ExistKV

func (cache *Cache) ExistKV(userID, dbID, taskID int) (result bool, err error)

func (*Cache) GetKV

func (cache *Cache) GetKV(userID, dbID, taskID int) (timestamp int64, err error)

func (*Cache) SetKV

func (cache *Cache) SetKV(userID, dbID, taskID int) (err error)

Jump to

Keyboard shortcuts

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