Registry / web-framework / go-chi-cache

go-chi-cache

JSON →
library0.2.1gogounverified

Provides a caching middleware for the Chi router with support for multiple cache backends.

go get gitea.com/go-chi/cache
INSTALL
IMPORT
SIG · GO-CHI-CACHE
G
go-chi-cache
web-frameworkgov0.2.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

cache
gitea.com/go-chi/cache

Add caching middleware to a Chi router

package main import ( "net/http" "github.com/go-chi/chi/v5" "gitea.com/go-chi/cache" ) func main() { r := chi.NewRouter() r.Use(cache.New(cache.Options{}).Handler) r.Get("/", func(w http.ResponseWriter, r *http.Request) { w.Write([]byte("cached")) }) http.ListenAndServe(":8080", r) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.2.1latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
go-chi-cache — go get go-chi-cache · libregistry