Documentation

Overview

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {

	// contains filtered or unexported fields

}

Config contains the configuration for hot caching of requests

func New

func New(timeout time.Duration) *Config

New creates a new configurated Config for hot caching

func (*Config) Middleware

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

Middleware wraps a request and hot caches it

Source Files