connection

package
v3.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2022 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

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
}

simple cache implemented using ristretto cache library

func NewCache

func NewCache(config *ristretto.Config) *Cache

func (*Cache) Delete

func (cache *Cache) Delete(key string)

func (*Cache) Get

func (cache *Cache) Get(key string) (interface{}, bool)

func (*Cache) Set

func (cache *Cache) Set(key string, value interface{}) bool

func (*Cache) SetWithTTL

func (cache *Cache) SetWithTTL(key string, value interface{}, ttl time.Duration) bool

type Manager

type Manager struct {
	Cache *Cache
}

func NewManager

func NewManager() *Manager

Jump to

Keyboard shortcuts

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