cache

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: Apache-2.0 Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileBasedCache

type FileBasedCache struct{}

func (*FileBasedCache) Exists

func (*FileBasedCache) Exists(key string) bool

func (*FileBasedCache) Load

func (*FileBasedCache) Load(key string) (string, error)

func (*FileBasedCache) Store

func (*FileBasedCache) Store(key string, data string) error

type ICache

type ICache interface {
	Store(key string, data string) error
	Load(key string) (string, error)
	Exists(key string) bool
}

func New

func New(noCache bool) ICache

type NoopCache

type NoopCache struct{}

func (*NoopCache) Exists

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

func (*NoopCache) Load

func (c *NoopCache) Load(key string) (string, error)

func (*NoopCache) Store

func (c *NoopCache) Store(key string, data string) error

Jump to

Keyboard shortcuts

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