cache

package
v0.0.0-...-f296039 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled bool `yaml:"enabled"`
	TTL     int  `yaml:"ttl"`
	Cleanup int  `yaml:"cleanup"`
}

type Service

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

func NewService

func NewService(cfg *Config) *Service

func (*Service) Delete

func (s *Service) Delete(key string)

func (*Service) Flush

func (s *Service) Flush()

func (*Service) Get

func (s *Service) Get(key string) (interface{}, bool)

func (*Service) Set

func (s *Service) Set(key string, value interface{}, ttl time.Duration)

Jump to

Keyboard shortcuts

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