cache

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2021 License: Apache-2.0 Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

func (*Cache) Del

func (c *Cache) Del(key string) error

func (*Cache) Exists

func (c *Cache) Exists(key string) bool

func (*Cache) Get

func (c *Cache) Get(key string) (*cache.Cache, error)

func (*Cache) Set

func (c *Cache) Set(entity *cache.Cache, expiration time.Duration) error

type Interface

type Interface interface {
	Get(key string) (*cache.Cache, error)
	Exists(key string) bool
	Set(entity *cache.Cache, expiration time.Duration) error
	Del(key string) error
}

func NewCacheRepository

func NewCacheRepository(databaseRead SQL.InterfaceRead, databaseWrite SQL.InterfaceWrite) Interface

type Mock

type Mock struct {
	mock.Mock
}

func (*Mock) Del

func (m *Mock) Del(key string) error

func (*Mock) Exists

func (m *Mock) Exists(key string) bool

func (*Mock) Get

func (m *Mock) Get(key string) (*cache.Cache, error)

func (*Mock) Set

func (m *Mock) Set(entity *cache.Cache, expiration time.Duration) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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