cache

package
v3.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager to operate cache

func NewCacheManager

func NewCacheManager(repository store.CacheRepository, conf config.Config) (*Manager, error)

NewCacheManager creates nes cache manager

func (*Manager) Get

func (m *Manager) Get(key string) (*model.CacheItem, error)

Get item from cache

func (*Manager) MaxAge

func (m *Manager) MaxAge() time.Time

MaxAge compute current cache max age

func (*Manager) Set

func (m *Manager) Set(key string, item *model.CacheItem) error

Set item into the cache

func (*Manager) Shutdown

func (m *Manager) Shutdown()

Shutdown cache manager

Jump to

Keyboard shortcuts

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