import "github.com/xyproto/algernon/cachemode"
Package cachemode provides ways to deal with different cache modes
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
var ( // Names is a map of cache mode setting string representations Names = map[Setting]string{ Unset: "unset", On: "On", Development: "Development", Production: "Production", Images: "Images", Small: "Small", Off: "Off", } )
Setting represents a cache mode setting
New creates a CacheModeSetting based on a variety of string options, like "on" and "off".
String returns the name of the cache mode setting, if set
Package cachemode is imported by 1 packages. Updated 2017-10-11. Refresh now. Tools for package owners.