Java使用Redis删除指定前缀Key
// 获取Redis中特定前缀 Set<String> keys = stringRedisTemplate.keys("BLOG_SORT_BY_MONTH:" + "*"); // 删除 stringRedisTemplate.delete(keys);
// 获取Redis中特定前缀 Set<String> keys = stringRedisTemplate.keys("BLOG_SORT_BY_MONTH:" + "*"); // 删除 stringRedisTemplate.delete(keys);