hotcache

package
v0.0.0-...-28d43d2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2020 License: MIT Imports: 5 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL