1
0
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:
astaxie
2016-01-04 10:50:04 +08:00
parent 92d157736b
commit a03fa0fb73
5 changed files with 18 additions and 15 deletions

View File

@ -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)
}