cache

package
v0.0.0-...-a5c10b0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Set(key string, value string, expiration time.Duration) error
	Get(key string) string
}

type CacheOnDisk

type CacheOnDisk struct {
	// contains filtered or unexported fields
}
var DefaultCache *CacheOnDisk

func New

func New(applicationName, name string, encryptionKey []byte) (*CacheOnDisk, error)

New instanciate a new cache object. The encryptionKey parameter is here for obscurity purpose.

func (*CacheOnDisk) Get

func (c *CacheOnDisk) Get(key string) string

func (*CacheOnDisk) Set

func (c *CacheOnDisk) Set(key string, value string, expiration time.Duration) error

Jump to

Keyboard shortcuts

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