开始新增代码生成配置2.0功能,配置文件格式规定完成
This commit is contained in:
Vendored
+17
-17
@@ -21,7 +21,7 @@ func (that *HoTimeCache) Session(key string, data ...interface{}) *Obj {
|
||||
//内存缓存有
|
||||
if that.memoryCache != nil && that.memoryCache.SessionSet {
|
||||
reData = that.memoryCache.Cache(key, data...)
|
||||
if reData != nil {
|
||||
if reData.Data != nil {
|
||||
return reData
|
||||
}
|
||||
}
|
||||
@@ -29,9 +29,9 @@ func (that *HoTimeCache) Session(key string, data ...interface{}) *Obj {
|
||||
//redis缓存有
|
||||
if that.redisCache != nil && that.redisCache.SessionSet {
|
||||
reData = that.redisCache.Cache(key, data...)
|
||||
if reData != nil {
|
||||
if reData.Data != nil {
|
||||
if that.memoryCache != nil && that.memoryCache.SessionSet {
|
||||
that.memoryCache.Cache(key, reData)
|
||||
that.memoryCache.Cache(key, reData.Data)
|
||||
}
|
||||
return reData
|
||||
}
|
||||
@@ -40,12 +40,12 @@ func (that *HoTimeCache) Session(key string, data ...interface{}) *Obj {
|
||||
//db缓存有
|
||||
if that.dbCache != nil && that.dbCache.SessionSet {
|
||||
reData = that.dbCache.Cache(key, data...)
|
||||
if reData != nil {
|
||||
if reData.Data != nil {
|
||||
if that.memoryCache != nil && that.memoryCache.SessionSet {
|
||||
that.memoryCache.Cache(key, reData)
|
||||
that.memoryCache.Cache(key, reData.Data)
|
||||
}
|
||||
if that.redisCache != nil && that.redisCache.SessionSet {
|
||||
that.redisCache.Cache(key, reData)
|
||||
that.redisCache.Cache(key, reData.Data)
|
||||
}
|
||||
|
||||
return reData
|
||||
@@ -76,7 +76,7 @@ func (that *HoTimeCache) Db(key string, data ...interface{}) *Obj {
|
||||
//内存缓存有
|
||||
if that.memoryCache != nil && that.memoryCache.DbSet {
|
||||
reData = that.memoryCache.Cache(key, data...)
|
||||
if reData != nil {
|
||||
if reData.Data != nil {
|
||||
return reData
|
||||
}
|
||||
}
|
||||
@@ -84,9 +84,9 @@ func (that *HoTimeCache) Db(key string, data ...interface{}) *Obj {
|
||||
//redis缓存有
|
||||
if that.redisCache != nil && that.redisCache.DbSet {
|
||||
reData = that.redisCache.Cache(key, data...)
|
||||
if reData != nil {
|
||||
if reData.Data != nil {
|
||||
if that.memoryCache != nil && that.memoryCache.DbSet {
|
||||
that.memoryCache.Cache(key, reData)
|
||||
that.memoryCache.Cache(key, reData.Data)
|
||||
}
|
||||
return reData
|
||||
}
|
||||
@@ -95,13 +95,13 @@ func (that *HoTimeCache) Db(key string, data ...interface{}) *Obj {
|
||||
//redis缓存有
|
||||
if that.dbCache != nil && that.dbCache.DbSet {
|
||||
reData = that.dbCache.Cache(key, data...)
|
||||
if reData != nil {
|
||||
if reData.Data != nil {
|
||||
if that.memoryCache != nil && that.memoryCache.DbSet {
|
||||
that.memoryCache.Cache(key, reData)
|
||||
that.memoryCache.Cache(key, reData.Data)
|
||||
}
|
||||
|
||||
if that.redisCache != nil && that.redisCache.DbSet {
|
||||
that.redisCache.Cache(key, reData)
|
||||
that.redisCache.Cache(key, reData.Data)
|
||||
}
|
||||
|
||||
return reData
|
||||
@@ -140,10 +140,10 @@ func (that *HoTimeCache) Cache(key string, data ...interface{}) *Obj {
|
||||
//redis缓存有
|
||||
if that.redisCache != nil {
|
||||
reData = that.redisCache.Cache(key, data...)
|
||||
if reData != nil {
|
||||
if reData.Data != nil {
|
||||
|
||||
if that.memoryCache != nil {
|
||||
that.memoryCache.Cache(key, reData)
|
||||
that.memoryCache.Cache(key, reData.Data)
|
||||
}
|
||||
return reData
|
||||
}
|
||||
@@ -152,12 +152,12 @@ func (that *HoTimeCache) Cache(key string, data ...interface{}) *Obj {
|
||||
//redis缓存有
|
||||
if that.dbCache != nil {
|
||||
reData = that.dbCache.Cache(key, data...)
|
||||
if reData != nil {
|
||||
if reData.Data != nil {
|
||||
if that.memoryCache != nil {
|
||||
that.memoryCache.Cache(key, reData)
|
||||
that.memoryCache.Cache(key, reData.Data)
|
||||
}
|
||||
if that.redisCache != nil {
|
||||
that.redisCache.Cache(key, reData)
|
||||
that.redisCache.Cache(key, reData.Data)
|
||||
}
|
||||
return reData
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user