Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
Config config.Config
Store stores.CacheStore
// Validators check to see whether the request should be cached.
Validators []func(c config.Config, w http.ResponseWriter, r *http.Request) bool
// contains filtered or unexported fields
}
Cache is the primary struct for Caddy to use. It contains the config, cache store, validators, and the logger.
func (Cache) CaddyModule ¶
func (Cache) CaddyModule() caddy.ModuleInfo
CaddyModule returns the Caddy module information.
func (*Cache) UnmarshalCaddyfile ¶
UnmarshalCaddyfile parses plugin settings from Caddyfile.
{
order cache first
cache {
type <redis>|<file>
host localhost:6379
}
}
cache {
expire 120 # Cache expiration in seconds
bypass {
paths wp-admin wp-login.php system # WordPress and ExpressionEngine
methods post # Don't typically cache POST
cookies wordpress_logged_in_.* # WordPress
# cookie exp_sessionid # ExpressionEngine
}
}
This may change.
Click to show internal directories.
Click to hide internal directories.