cache

package
v0.0.0-...-75248dd Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: Apache-2.0 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 (*Cache) Clear

func (c *Cache) Clear()

func (*Cache) Middleware

func (c *Cache) Middleware(next http.Handler) http.Handler

type Entry

type Entry struct {
	StatusCode int
	Headers    http.Header
	Body       []byte
	CreatedAt  time.Time
	TTL        time.Duration
}

func (*Entry) IsExpired

func (e *Entry) IsExpired() bool

type Manager

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

func NewManager

func NewManager() *Manager

func (*Manager) ClearAll

func (m *Manager) ClearAll()

func (*Manager) GetOrCreate

func (m *Manager) GetOrCreate(name string, config *config.CacheConfig) *Cache

Jump to

Keyboard shortcuts

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