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:latest
comby-store-redis supports the latest version of comby (v2), requires Go version 1.22+ and is based on Redis client v9.0.0.
go get github.com/gradientzero/comby-store-redis
import (
"github.com/gradientzero/comby-store-redis"
"github.com/gradientzero/comby/v2"
)
// 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 test -v ./...
Please follow the guidelines in CONTRIBUTING.md.
This project is licensed under the MIT License.