cachestore

package
v0.0.0-...-46fe095 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2019 License: LGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrLRUCacheError = errors.New("Error getting value from cache ")
View Source
var ErrLRUCacheValue = errors.New("Unkown value was found ")

Functions

This section is empty.

Types

type Endpoint

type Endpoint interface {
	Save(url *models.URL) error
	Get(baseURL string) (*models.URL, error)
	Delete(baseURL string) error
	Resolve(ctx echo.Context) error
	Dump(ctx echo.Context) error
}

func NewURLEndpoint

func NewURLEndpoint(store *URLCacheStore) Endpoint

type URLCacheStore

type URLCacheStore struct {
	// contains filtered or unexported fields
}

func NewURLCacheStore

func NewURLCacheStore(size, maxAge int, conn connector.Connector, path string, manager metrics.MetricManager) (*URLCacheStore, error)

func (*URLCacheStore) Dump

func (ucs *URLCacheStore) Dump() (int, error)

evicts all LRU cache to Disk

func (*URLCacheStore) Size

func (ucs *URLCacheStore) Size() int

func (*URLCacheStore) Start

func (ucs *URLCacheStore) Start() error

Jump to

Keyboard shortcuts

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