cache

package
v1.0.106 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package cache allows storing temporary cache data which is preserved across multiple CLI invocations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache interface {
	Get(key string) (string, float32)
	Set(key string, value string, expiresIn float32)
}

Cache interface for storing temporary data. It is used to persist bearer tokens and other temporary auth tokens in order to preserve them across multiple CLI invocations.

type FileCache

type FileCache struct{}

The FileCache stores data on disk in order to preserve them across multiple CLI invocations.

func NewFileCache

func NewFileCache() *FileCache

func (FileCache) Get

func (c FileCache) Get(key string) (string, float32)

func (FileCache) Set

func (c FileCache) Set(key string, value string, expiresIn float32)

Jump to

Keyboard shortcuts

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