mirror of
https://github.com/astaxie/beego.git
synced 2025-06-11 08:20:40 +00:00
improve cache modules. support mulit instances
This commit is contained in:
4
cache/redis/redis.go
vendored
4
cache/redis/redis.go
vendored
@ -55,7 +55,7 @@ type Cache struct {
|
||||
}
|
||||
|
||||
// NewRedisCache create new redis cache with default collection name.
|
||||
func NewRedisCache() *Cache {
|
||||
func NewRedisCache() cache.Cache {
|
||||
return &Cache{key: DefaultKey}
|
||||
}
|
||||
|
||||
@ -236,5 +236,5 @@ func (rc *Cache) connectInit() {
|
||||
}
|
||||
|
||||
func init() {
|
||||
cache.Register("redis", NewRedisCache())
|
||||
cache.Register("redis", NewRedisCache)
|
||||
}
|
||||
|
Reference in New Issue
Block a user