mapcache

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: ISC Imports: 3 Imported by: 0

Documentation

Overview

Package mapcache is very similar to rediscache, except there are no external dependencies and the page output is saved in a map

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

func New

func New() *Cache

func (*Cache) Clear

func (c *Cache) Clear()

func (*Cache) Handle

func (c *Cache) Handle(next http.Handler) http.Handler

Handle is a Simple function that will cache the response for given handler in redis and instead of responding with the result from the handler it will simply dump the contents of the redis key if it exists.

func (*Cache) HandleWithParams

func (c *Cache) HandleWithParams(next http.Handler) http.Handler

HandleWithParams is the same as Handle but caches for the GET params rather than discarding them.

func (*Cache) Remove

func (c *Cache) Remove(path string)

Source Files

  • main.go

Jump to

Keyboard shortcuts

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