当前位置:网站首页>RedisSystemException:WRONGTYPE Operation against a key holding the wrong kind of value
RedisSystemException:WRONGTYPE Operation against a key holding the wrong kind of value
2022-07-06 18:41:00 【Monkey who loves life】
One 、 Error message
I reported this error when deleting the cache :WRONGTYPE Operation against a key holding the wrong kind of value
Two 、 Wrong meaning
Wrong type operation for the key holding the wrong type value
3、 ... and 、 The cause of the error
When I save the cache, I use zset structure :
redisTemplate.opsForSet().add(key,value);
But when I delete this cache, I use :
redisTemplate.opsForZSet().remove(key,value);
Therefore, data structure inconsistency leads to , Error when deleting .
Four 、 terms of settlement
When deleting the cache structure, change to Set:
redisTemplate.opsForSet().remove(key,value);
Keep the same structure when saving and deleting .
This is the problem I encountered in my actual work , I hope it helps you ~
边栏推荐
- Execution process of MySQL query request - underlying principle
- Introduction to the use of SAP Fiori application index tool and SAP Fiori tools
- Self supervised heterogeneous graph neural network with CO comparative learning
- JDBC驱动器、C3P0、Druid和JDBCTemplate相关依赖jar包
- 测试123
- Numerical analysis: least squares and ridge regression (pytoch Implementation)
- Grafana 9.0 正式发布!堪称最强!
- [.Net core] solution to error reporting due to too long request length
- Stm32+hc05 serial port Bluetooth design simple Bluetooth speaker
- 10、 Process management
猜你喜欢
随机推荐
根据PPG估算血压利用频谱谱-时间深度神经网络【翻】
手写一个的在线聊天系统(原理篇1)
First, look at K, an ugly number
巨杉数据库首批入选金融信创解决方案!
一种用于夜间和无袖测量血压手臂可穿戴设备【翻译】
使用cpolar建立一个商业网站(1)
STM32+MFRC522完成IC卡号读取、密码修改、数据读写
徐翔妻子应莹回应“股评”:自己写的!
2022 Summer Project Training (III)
当保存参数使用结构体时必备的开发技巧方式
涂鸦智能在香港双重主板上市:市值112亿港元 年营收3亿美元
Penetration test information collection - site architecture and construction
AFNetworking框架_上传文件或图像server
Docker installation redis
Wchars, coding, standards and portability - wchars, encodings, standards and portability
Reprint: defect detection technology of industrial components based on deep learning
epoll()无论涉及wait队列分析
十、进程管理
30 minutes to understand PCA principal component analysis
小程序在产业互联网中的作用