gin-contrib / cache

Gin middleware/handler to enable Cache
https://gin-gonic.github.io/gin
MIT License
378 stars 96 forks source link

how to use the func "Dial" in other package #45

Open Hyvi opened 5 years ago

Hyvi commented 5 years ago

https://github.com/gin-contrib/cache/blob/031ec46e6ce8b5a0e0302dca3a8dbf9b44cd10b4/persistence/redis.go#L22


    rs = persistence.NewRedisCache(host, password, 0)
    c, err := rs.pool.Dial()
    if err != nil {
        global.Log.Println(err)
        global.Log.Fatalf("open redis connection error")
    }
`` ``
tip: "rs.pool undefined (cannot refer to unexported field or method pool)"
thx