gobcache

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: AGPL-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 Client

type Client struct {
	Config Config
}

func NewCache

func NewCache(config Config) Client

func (*Client) GetData

func (c *Client) GetData(hash string, obj interface{}) error

func (*Client) SaveData

func (c *Client) SaveData(filename string, data interface{}) error

type Config

type Config struct {
	// Were the *.gob files will be stored
	Path string
	// Renew cache when file is older than TTL (in hours)
	TTL int64
	// Add custom logger, default is *log.Logger from GO
	Logger *log.Logger
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳