cache

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: MIT Imports: 6 Imported by: 0

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(ttlDays int) (*Cache, error)

func (*Cache) Get

func (c *Cache) Get(hash string) string

func (*Cache) Hash

func (c *Cache) Hash(text string) string

func (*Cache) Set

func (c *Cache) Set(hash, original, corrected string) error

type CacheEntry

type CacheEntry struct {
	Hash      string `json:"hash"`
	Original  string `json:"original"`
	Corrected string `json:"corrected"`
	Timestamp int64  `json:"timestamp"`
}

Jump to

Keyboard shortcuts

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