cache

package
v0.0.0-...-f2e39e4 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dataloader

type Dataloader struct {
	// contains filtered or unexported fields
}

Dataloader implements the dataloader.Cache interface

func NewDataloader

func NewDataloader(ttl time.Duration) *Dataloader

func (*Dataloader) Clear

func (d *Dataloader) Clear()

Clear clears the cache

func (*Dataloader) Delete

func (d *Dataloader) Delete(_ context.Context, key dataloader.Key) bool

Delete deletes and item in the cache

func (*Dataloader) Get

Get gets a value from the cache

func (*Dataloader) Set

func (d *Dataloader) Set(_ context.Context, key dataloader.Key, value dataloader.Thunk)

Set sets a value in the cache

Jump to

Keyboard shortcuts

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