handlers

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const CacheTypeFile = "file"
View Source
const CacheTypeMemory = "memory"

Variables

This section is empty.

Functions

This section is empty.

Types

type InFile

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

func NewInFile

func NewInFile(cacheDir string, ttl time.Duration) (*InFile, error)

func (*InFile) Read

func (h *InFile) Read(name string, data interface{}) bool

func (*InFile) Type

func (h *InFile) Type() string

func (*InFile) Write

func (h *InFile) Write(name string, data interface{}) error

type InMemory

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

func NewInMemory

func NewInMemory(cache *bigcache.BigCache) *InMemory

func (*InMemory) Read

func (h *InMemory) Read(name string, data interface{}) bool

func (*InMemory) Type

func (h *InMemory) Type() string

func (*InMemory) Write

func (h *InMemory) Write(name string, data interface{}) error

Jump to

Keyboard shortcuts

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