disgordtlru

package module
v0.0.0-...-cec56a6 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: BSD-3-Clause Imports: 6 Imported by: 0

README

disgord-tlru

A TLRU cache for disgord by implementing the go-tlru library. Based on the base LFU cache implementation by Anders.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCache

func NewCache(conf CacheConfig) disgord.Cache

NewCache is used to create a new cache.

Types

type CacheConfig

type CacheConfig struct {
	DoNotReturnGetGuildMembers bool

	UserMaxItems int
	UserMaxBytes int
	UserDuration time.Duration

	VoiceStatesMaxItems int
	VoiceStatesMaxBytes int
	VoiceStatesDuration time.Duration

	GuildMaxItems int
	GuildMaxBytes int
	GuildDuration time.Duration
}

CacheConfig is used to define the cache configuration.

Jump to

Keyboard shortcuts

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