新增删除Hash中的某条数据

This commit is contained in:
runphp 2022-08-04 01:39:58 +00:00 committed by Gitee
parent b51c127eb7
commit 4ae26c2f86
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -243,6 +243,18 @@ public class RedisService
return redisTemplate.opsForHash().multiGet(key, hKeys);
}
/**
* 删除Hash中的某条数据
*
* @param key Redis键
* @param hKey Hash键
* @return 是否成功
*/
public boolean deleteCacheMapValue(final String key, final String hKey)
{
return Boolean.TRUE.equals(redisTemplate.opsForHash().delete(key, hKey));
}
/**
* 获得缓存的基本对象列表
*