瀏覽代碼

fit: debug

gaoyagang 1 年之前
父節點
當前提交
4186f41011
共有 1 個文件被更改,包括 15 次插入13 次删除
  1. 15 13
      app/cmd/organization/internal/logic/handler/vars.go

+ 15 - 13
app/cmd/organization/internal/logic/handler/vars.go

@@ -59,20 +59,22 @@ var (
 )
 
 func (t DeviceBindCacheMap) GetCache(technologyName string) []model.DcDeviceBind {
-	if cache, ok := t[technologyName]; ok {
-		if time.Now().After(cache.Expire) {
-			t[technologyName] = DeviceBindCache{}
-			return nil
-		}
-		return cache.Data
-	} else {
-		return nil
-	}
+	return nil
+	//if cache, ok := t[technologyName]; ok {
+	//	if time.Now().After(cache.Expire) {
+	//		t[technologyName] = DeviceBindCache{}
+	//		return nil
+	//	}
+	//	return cache.Data
+	//} else {
+	//	return nil
+	//}
 }
 
 func (t DeviceBindCacheMap) SetCache(technologyName string, data []model.DcDeviceBind, expire time.Time) {
-	t[technologyName] = DeviceBindCache{
-		Expire: expire,
-		Data:   data,
-	}
+	return
+	//t[technologyName] = DeviceBindCache{
+	//	Expire: expire,
+	//	Data:   data,
+	//}
 }