cache

package
v1.36.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2026 License: MIT Imports: 5 Imported by: 1

Documentation

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
}

func New

func New(filename, namespace string) Cache

func (*Cache) ClearAllItemsInNamespace

func (c *Cache) ClearAllItemsInNamespace() error

func (*Cache) ClearItem

func (c *Cache) ClearItem(key string) error

func (*Cache) GetItem

func (c *Cache) GetItem(key string) (string, bool)

func (*Cache) SetItem

func (c *Cache) SetItem(key string, content string, ttl time.Duration)

type Item

type Item struct {
	UpdatedAt time.Time `json:"updated_at"`
	ExpiresAt time.Time `json:"expires_at"`
	Content   string    `json:"content"`
}

Jump to

Keyboard shortcuts

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