Versions in this module Expand all Collapse all v0 v0.2.4 Apr 8, 2018 v0.2.3 Aug 11, 2017 v0.2.2 Aug 2, 2017 Changes in this version + func Setup(c *caddy.Controller) error + type CacheRule interface + type Config struct + CacheRules []CacheRule + DefaultMaxAge time.Duration + LockTimeout time.Duration + Path string + StatusHeader string + type HTTPCache struct + func NewHTTPCache() *HTTPCache + func (cache *HTTPCache) Get(request *http.Request) (*HTTPCacheEntry, bool) + func (cache *HTTPCache) Put(request *http.Request, entry *HTTPCacheEntry) + type HTTPCacheEntry struct + Request *http.Request + Response *Response + func NewHTTPCacheEntry(key string, request *http.Request, response *Response, config *Config) *HTTPCacheEntry + func (e *HTTPCacheEntry) Clean() error + func (e *HTTPCacheEntry) Fresh() bool + func (e *HTTPCacheEntry) Key() string + func (e *HTTPCacheEntry) WriteBodyTo(w http.ResponseWriter) error + type Handler struct + Cache *HTTPCache + Config *Config + Next httpserver.Handler + URLLocks *URLLock + func NewHandler(Next httpserver.Handler, config *Config) *Handler + func (handler *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) + type HeaderCacheRule struct + Header string + Value []string + type PathCacheRule struct + Path string + type Response struct + Code int + HeaderMap http.Header + func NewResponse() *Response + func (rw *Response) Clean() error + func (rw *Response) Close() error + func (rw *Response) CloseNotify() <-chan bool + func (rw *Response) Flush() + func (rw *Response) Header() http.Header + func (rw *Response) SetBody(body storage.ResponseStorage) + func (rw *Response) WaitBody() + func (rw *Response) WaitClose() + func (rw *Response) WaitHeaders() + func (rw *Response) Write(buf []byte) (int, error) + func (rw *Response) WriteHeader(code int) + type URLLock struct + func NewURLLock() *URLLock + func (allLocks *URLLock) Adquire(key string) *sync.Mutex