cache

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: GPL-3.0 Imports: 5 Imported by: 1

Documentation

Overview

Provides a caching mechanism to reduce the amount of API calls.

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
}

Caches objects to reduce the number of API calls.

func New

func New(expiresAfter time.Duration) Cache

func (*Cache) Fetch

func (c *Cache) Fetch(key string) interface{}

func (*Cache) IsOld

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

func (*Cache) Store

func (c *Cache) Store(key string, data interface{})

Jump to

Keyboard shortcuts

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