xorm-redis-cache
xorm-redis-cache copied to clipboard
XORM Redis Cache
When serialize a interface, it error with ```type not registered for interface``` See: https://play.golang.org/p/uR-Xumj8O9J
func (c *RedisCacher) delObjects(key string) error { c.logDebugf("delObjects key:[%s]", key) conn := c.pool.Get() defer conn.Close() keys, err := conn.Do("KEYS", key) c.logDebugf("delObjects keys: %v", keys) if err == nil { for...
``` [xorm] [debug] 2017/12/05 18:05:30.548400 [redis_cacher] PutBean|tableName:created_insert|id:��PK����int64|key:xorm:bean:created_insert:��PK����int64|type:*tests.CreatedInsert [xorm] [debug] 2017/12/05 18:05:30.548903 [redis_cacher] registerGobConcreteType:*tests.CreatedInsert --- FAIL: TestMysqlWithCache (0.83s) panic: gob: registering duplicate names for tests.CreatedInsert: "*tests.CreatedInsert" != "github.com/go-xorm/tests.CreatedInsert" [recovered] panic: gob:...
```golang 83 func (c *RedisCacher) logErrf(format string, contents ...interface{}) { 84 if c.Logger != nil { 85 c.Logger.Errorf(fmt.Sprintf("%s %s", LOGGING_PREFIX, format), contents...) 86 //c.Logger.Errf(fmt.Sprintf("%s %s", LOGGING_PREFIX, format), contents...) 87 }...