Versions in this module Expand all Collapse all v0 v0.4.5 Apr 10, 2021 v0.4.4 Apr 10, 2021 Changes in this version + const BYTE + const GB + const KB + const MB + type CacheType string + type Config struct + CacheBucketsNum int + CacheKeyTemplate string + CacheMaxMemorySize int + DefaultMaxAge time.Duration + LockTimeout time.Duration + Path string + RedisConnectionSetting string + RuleMatchers []RuleMatcher + RuleMatchersRaws []RuleMatcherRawWithType + StatusHeader string + Type CacheType + type Entry struct + Request *http.Request + Response *Response + func NewEntry(key string, request *http.Request, response *Response, config *Config) *Entry + func (e *Entry) Clean() error + func (e *Entry) IsFresh() bool + func (e *Entry) Key() string + func (e *Entry) WriteBodyTo(w http.ResponseWriter) error + type HTTPCache struct + func NewHTTPCache(config *Config, distributedOn bool) *HTTPCache + func (h *HTTPCache) Del(key string) error + func (h *HTTPCache) Get(key string, request *http.Request) (*Entry, bool) + func (h *HTTPCache) Keys() []string + func (h *HTTPCache) Put(request *http.Request, entry *Entry) + type Handler struct + Cache *HTTPCache + Config *Config + Distributed *distributed.ConsulService + DistributedRaw json.RawMessage + URLLocks *URLLock + func (Handler) CaddyModule() caddy.ModuleInfo + func (h *Handler) Cleanup() error + func (h *Handler) Provision(ctx caddy.Context) error + func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error + func (h *Handler) UnmarshalCaddyfile(d *caddyfile.Dispenser) error + func (h *Handler) Validate() error + type HeaderRuleMatcher struct + Header string + Value []string + type PathRuleMatcher struct + Path string + type PurgePayload struct + Host string + Method string + URI string + type Response struct + Code int + HeaderMap http.Header + IsFirstByteWritten bool + func NewResponse() *Response + func (r *Response) Clean() error + func (r *Response) Close() error + func (r *Response) Flush() + func (r *Response) GetReader() (io.ReadCloser, error) + func (r *Response) Header() http.Header + func (r *Response) SetBody(body backends.Backend) + func (r *Response) WaitClose() + func (r *Response) WaitHeaders() + func (r *Response) Write(buf []byte) (int, error) + func (r *Response) WriteHeader(code int) + type RuleMatcher interface + type RuleMatcherRawWithType struct + Data json.RawMessage + Type RuleMatcherType + type RuleMatcherType string + const MatcherTypeHeader + const MatcherTypePath + type URLLock struct + func NewURLLock(config *Config) *URLLock + func (allLocks *URLLock) Acquire(key string) *sync.Mutex