1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-11 08:00: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

@ -46,7 +46,7 @@ type Cache struct {
}
// NewMemCache create new memcache adapter.
func NewMemCache() *Cache {
func NewMemCache() cache.Cache {
return &Cache{}
}
@ -184,5 +184,5 @@ func (rc *Cache) connectInit() error {
}
func init() {
cache.Register("memcache", NewMemCache())
cache.Register("memcache", NewMemCache)
}