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:
4
cache/memcache/memcache.go
vendored
4
cache/memcache/memcache.go
vendored
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user