From 33ddf707b56c305d131e59a2c8a1833ac7ba627d Mon Sep 17 00:00:00 2001 From: lawrencehj <65707521+lawrencehj@users.noreply.github.com> Date: Wed, 29 Dec 2021 18:08:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=95=8C=E9=9D=A2=E5=88=A0=E9=99=A4=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E5=90=8E=E5=90=8C=E6=97=B6=E5=88=A0=E9=99=A4Redis?= =?UTF-8?q?=E7=9A=84=E5=AF=B9=E5=BA=94=E6=9D=A1=E7=9B=AE=EF=BC=8C=E9=81=BF?= =?UTF-8?q?=E5=85=8D=E5=85=B6=E5=AE=83=E8=AE=BE=E5=A4=87=E7=94=A8=E5=90=8C?= =?UTF-8?q?=E6=A0=B7IP=E7=99=BB=E5=BD=95=E6=97=B6=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/vmp/storager/impl/RedisCatchStorageImpl.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/com/genersoft/iot/vmp/storager/impl/RedisCatchStorageImpl.java b/src/main/java/com/genersoft/iot/vmp/storager/impl/RedisCatchStorageImpl.java index 3ded4168..cc07784f 100644 --- a/src/main/java/com/genersoft/iot/vmp/storager/impl/RedisCatchStorageImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/storager/impl/RedisCatchStorageImpl.java @@ -318,6 +318,15 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage { redis.del(key.toString()); } } + + List deviceCache = redis.scan(String.format("%S%s_%s", VideoManagerConstants.DEVICE_PREFIX, + userSetup.getServerId(), + deviceId)); + if (deviceCache.size() > 0) { + for (Object key : deviceCache) { + redis.del(key.toString()); + } + } } @Override