std

package
v0.0.0-...-0b985ef Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package std represents the interface caching implementation.

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
}

Cache predetermines the consistency of the interfaces caching implementation.

func New

func New(defaultValidity time.Duration) (*Cache, error)

New - Cache constructor.

func (*Cache) Add

func (c *Cache) Add(key interface{}, item caching.Item)

Add - adds an item to the cache only if the item by key is missing.

func (*Cache) Flush

func (c *Cache) Flush()

Flush - flush cache.

func (*Cache) Get

func (c *Cache) Get(key interface{}) (item caching.Item, ok bool)

Get - provides an item by key and a sign of its being in the cache.

func (*Cache) Set

func (c *Cache) Set(key interface{}, item caching.Item)

Set - sets an item by key regardless of whether the item is in the cache.

Jump to

Keyboard shortcuts

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