cache

package
v6.2.13 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

type Middleware struct {
	Skipper middleware.Skipper
	// contains filtered or unexported fields
}

Middleware is a middleware that sets the Cache-Control header (no-cache or max-age) for the given request URLs. Use MaxAge or NoCache to create a new instance.

func MaxAge

func MaxAge(maxAge time.Duration, requestURLs ...string) Middleware

MaxAge creates a new middleware that sets the Cache-Control header to the given max-age for the given request URLs.

func NoCache

func NoCache(requestURLs ...string) Middleware

NoCache creates a new middleware that sets the Cache-Control header to no-cache for the given request URLs.

func (Middleware) Handle

func (m Middleware) Handle(next echo.HandlerFunc) echo.HandlerFunc

Jump to

Keyboard shortcuts

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