当前位置:网站首页>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 ~
边栏推荐
- 2022 Summer Project Training (II)
- STM32+HC05串口蓝牙设计简易的蓝牙音箱
- [Sun Yat sen University] information sharing of postgraduate entrance examination and re examination
- 【剑指 Offer】 60. n个骰子的点数
- C language college laboratory reservation registration system
- Brief description of SQL optimization problems
- 44所高校入选!分布式智能计算项目名单公示
- 人体骨骼点检测:自顶向下(部分理论)
- Celery best practices
- DOM简要
猜你喜欢
视频化全链路智能上云?一文详解什么是阿里云视频云「智能媒体生产」
Self-supervised Heterogeneous Graph Neural Network with Co-contrastive Learning 论文阅读
Penetration test information collection - WAF identification
[Sun Yat sen University] information sharing of postgraduate entrance examination and re examination
None of the strongest kings in the monitoring industry!
Docker installation redis
win10系统下插入U盘有声音提示却不显示盘符
图之广度优先遍历
Nuc11 cheetah Canyon setting U disk startup
CSRF vulnerability analysis
随机推荐
AFNetworking框架_上传文件或图像server
被疫情占据的上半年,你还好么?| 2022年中总结
epoll()无论涉及wait队列分析
视频化全链路智能上云?一文详解什么是阿里云视频云「智能媒体生产」
Brief description of SQL optimization problems
Huawei 0 foundation - image sorting
[.Net core] solution to error reporting due to too long request length
CSRF vulnerability analysis
POJ 2208 six lengths of tetrahedron are known, and the volume is calculated
287. 寻找重复数
Maixll-Dock 摄像头使用
图之广度优先遍历
Introduction to the use of SAP Fiori application index tool and SAP Fiori tools
Penetration test information collection - WAF identification
基于ppg和fft神经网络的光学血压估计【翻译】
Excellent open source fonts for programmers
MySQL查询请求的执行过程——底层原理
小程序在产业互联网中的作用
ORACLE进阶(四)表连接讲解
Five data structures of redis