cachemode

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: BSD-3-Clause Imports: 0 Imported by: 0

Documentation

Overview

Package cachemode provides ways to deal with different cache modes

Index

Constants

View Source
const (
	Unset       = iota // cache mode has not been set
	On                 // cache everything
	Development        // cache everything, except Amber, Lua, GCSS and Markdown
	Production         // cache everything, except Amber and Lua
	Images             // cache images (png, jpg, gif, svg)
	Small              // only cache small files (<=64KB) // 64 * 1024
	Off                // cache nothing
	Default     = On
)

Possible cache modes

Variables

View Source
var Names = map[Setting]string{
	Unset:       "unset",
	On:          "On",
	Development: "Development",
	Production:  "Production",
	Images:      "Images",
	Small:       "Small",
	Off:         "Off",
}

Names is a map of cache mode setting string representations

Functions

This section is empty.

Types

type Setting

type Setting int

Setting represents a cache mode setting

func New

func New(mode string) Setting

New creates a CacheModeSetting based on a variety of string options, like "on" and "off".

func (Setting) String

func (cms Setting) String() string

String returns the name of the cache mode setting, if set

Jump to

Keyboard shortcuts

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