ion: github.com/estebarb/ion/middleware/hotcache Index | Files

package hotcache

import "github.com/estebarb/ion/middleware/hotcache"

Package hotcache intercepts and group equal requests, perform a single server request. Is ideal for caching really hot pages, like front pages. Is not ideal for caching responses that depends on the logged user.

Index

Package Files

hotcache.go

type Config Uses

type Config struct {
    // contains filtered or unexported fields
}

Config contains the configuration for hot caching of requests

func New Uses

func New(timeout time.Duration) *Config

New creates a new configurated Config for hot caching

func (*Config) Middleware Uses

func (c *Config) Middleware(next http.Handler) http.Handler

Middleware wraps a request and hot caches it

Package hotcache imports 5 packages (graph). Updated 2017-01-10. Refresh now. Tools for package owners.