Registry / web-framework / chenyahui-gin-cache

chenyahui-gin-cache

JSON →
library1.10.0gogounverified

A caching middleware for the Gin web framework that supports multiple storage backends.

go get github.com/chenyahui/gin-cache
INSTALL
IMPORT
SIG · CHENYAHUI-GIN-CACH
C
chenyahui-gin-cache
web-frameworkgov1.10.0
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
✓ github.com/chenyahui/gin-cache

Caching a Gin route with in-memory store

package main import ( "github.com/gin-gonic/gin" "github.com/chenyahui/gin-cache" "github.com/chenyahui/gin-cache/persist" ) func main() { r := gin.Default() store := persist.NewMemoryStore(60) r.GET("/hello", cache.CacheByRequestURI(store, 10*time.Second), func(c *gin.Context) { c.String(200, "Hello, World!") }) r.Run() }
Debug
Known issues

No known issues recorded.

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

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
12
OpenAI (training)
1
Resources
chenyahui-gin-cache — go get chenyahui-gin-cache · libregistry