Registry / database / go-redis-cache

go-redis-cache

JSON →
library6.4.0+incompatiblegogounverified

Package cache provides a Redis-backed caching library for Go with support for structs and expiration.

go get github.com/go-redis/cache
INSTALL
IMPORT
SIG · GO-REDIS-CACHE
G
go-redis-cache
databasegov6.4.0+incompatible
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/go-redis/cache

Create a Redis cache and set a key-value pair.

import "github.com/go-redis/cache" func main() { ring := redis.NewRing(&redis.RingOptions{ Addrs: map[string]string{"server": ":6379"}, }) c := cache.New(&cache.Options{ Redis: ring, }) err := c.Set(&cache.Item{ Key: "mykey", Value: "myvalue", }) _ = err }
Debug
Known issues
breakingVersion 6.4.0+incompatible indicates a major version mismatch; the module path should include /v6 for proper Go modules support.
fix
Use import path github.com/go-redis/cache/v6 for version 6.x.
affects: >=6.0.0
Upgrade
Version history
6.4.0+incompatiblelatest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
12
Resources
go-redis-cache — go get go-redis-cache · libregistry