cachehandler

package
v0.0.0-...-2e26f47 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitCachingSystem

func InitCachingSystem(c *config.Config) (*[]CacheHandler, error)

Types

type CacheHandler

type CacheHandler interface {
	Init() error
	Put(string, string, string, int64) error // set Key value
	Get(string) ([]string, error)            // get value
	Close() error
	CleanUp() (int64, error) // cleanup all records aged than N seconds
}

type SqliteHandler

type SqliteHandler struct {
	FileName          string
	ExpireAgeinSecond int
	// contains filtered or unexported fields
}

func (*SqliteHandler) CleanUp

func (s *SqliteHandler) CleanUp() (int64, error)

func (*SqliteHandler) Close

func (s *SqliteHandler) Close() error

func (*SqliteHandler) Get

func (s *SqliteHandler) Get(key string) ([]string, error)

func (*SqliteHandler) Init

func (s *SqliteHandler) Init() error

func (*SqliteHandler) Put

func (s *SqliteHandler) Put(key, value, source string, unixtimestamp int64) error

Jump to

Keyboard shortcuts

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