Documentation
¶
Overview ¶
Package cache provides HTTP caching middleware for xun web applications. It allows setting Cache-Control headers based on configurable rules and paths.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(opts ...Option) xun.Middleware
New creates a xun middleware that applies caching rules to HTTP responses. It accepts optional configurations through Option functions and returns a middleware that sets Cache-Control headers based on request URL paths.
Types ¶
type Options ¶
type Options struct {
Rules []Rule // Collection of caching rules to apply
}
Options stores configuration for the cache middleware.
Click to show internal directories.
Click to hide internal directories.