缓存菜品的业务代码
方法
private void cleancharache(String pattern){ Set keys = redisTemplate.keys(pattern); redisTemplate.delete(keys); }
//将所有的菜品缓存数据清理掉,所有以dish_开头的 cleancharache("dish_*");
private void cleancharache(String pattern){ Set keys = redisTemplate.keys(pattern); redisTemplate.delete(keys); }
//将所有的菜品缓存数据清理掉,所有以dish_开头的 cleancharache("dish_*");