config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: MIT Imports: 1 Imported by: 0

README

Config Example

{
    order cache first

    cache {
        type redis
        host 127.0.0.1:6379                 # Redis IP/Port
    }
}

http://localhost:9090
cache {
    expire 120                              # Cache expiration in seconds
    method post                             # HTTP Methods you want to bypass
    bypass wp-admin wp-login.php system     # URIs - WordPress and ExpressionEngine
    # cookie uses regular expressions
    # cookie exp_sessionid                  # ExpressionEngine
    cookie wordpress_logged_in_.*           # WordPress
}
reverse_proxy localhost:8080

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bypass

type Bypass struct {
	Paths   []string `json:"paths"`
	Methods []string `json:"methods"`
	Cookies []string `json:"cookies"`
}

Bypass sets what should be bypassed by the cache.

type Config

type Config struct {
	Type   string `json:"type,omitempty"`
	Host   string `json:"host,omitempty"`
	Expire int    `json:"expire"`

	Bypass Bypass `json:"bypass"`

	CookieRegexp []*regexp.Regexp
}

Config options

Jump to

Keyboard shortcuts

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