|
@@ -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,
|
|
|
+ //}
|
|
|
}
|