Simple implementation of the CacheStore interface defined in comby with Redis. comby is a powerful application framework designed with Event Sourcing and Command Query Responsibility Segregation (CQRS) principles, written in Go.
# run redis server locally for testings
docker run -d --name redis-stack-server -p 6379:6379 redis/redis-stack-server:latestcomby-store-redis supports the latest version of comby (v3), requires Go version 1.22+ and is based on Redis client v9.0.0.
go get github.com/gradientzero/comby-store-redisimport (
"github.com/gradientzero/comby-store-redis"
"github.com/gradientzero/comby/v3"
)
// create redis CacheStore
cacheStore := store.NewCacheStoreRedis("localhost:6379", "", 0)
if err = cacheStore.Init(ctx,
comby.CacheStoreOptionWithAttribute("anyKey", "anyValue"),
); err != nil {
panic(err)
}
// create Facade
fc, _ := comby.NewFacade(
comby.FacadeWithCacheStore(cacheStore),
)go fmt ./...
go clean -testcache
go test -v ./... -covermode=count
go test -v ./... -race
go vet ./...
# go install honnef.co/go/tools/cmd/staticcheck@latest
staticcheck ./...Please follow the guidelines in CONTRIBUTING.md.
This project is licensed under the MIT License.