当前位置:网站首页>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 ~
边栏推荐
- Splay
- Distill knowledge from the interaction model! China University of science and Technology & meituan proposed virt, which combines the efficiency of the two tower model and the performance of the intera
- Celery best practices
- Use cpolar to build a business website (1)
- 基于ppg和fft神经网络的光学血压估计【翻译】
- 2022 Summer Project Training (III)
- 解读云原生技术
- atcoder它A Mountaineer
- 当保存参数使用结构体时必备的开发技巧方式
- Hongke shares | plate by plate ar application in Beijing Winter Olympics
猜你喜欢

Windows connects redis installed on Linux

C#/VB.NET 给PDF文档添加文本/图像水印

Shangsilicon Valley JUC high concurrency programming learning notes (3) multi thread lock

Xu Xiang's wife Ying Ying responded to the "stock review": she wrote it!
![[the 300th weekly match of leetcode]](/img/a7/16b491656863e2c423ff657ac6e9c5.png)
[the 300th weekly match of leetcode]

SQL injection - access injection, access offset injection

CSRF漏洞分析

2022-2024年CIFAR Azrieli全球学者名单公布,18位青年学者加入6个研究项目

Recursive way

Easy to use PDF to SVG program
随机推荐
Distill knowledge from the interaction model! China University of science and Technology & meituan proposed virt, which combines the efficiency of the two tower model and the performance of the intera
Easy to use PDF to SVG program
Introduction to the use of SAP Fiori application index tool and SAP Fiori tools
[Sun Yat sen University] information sharing of postgraduate entrance examination and re examination
涂鸦智能在香港双重主板上市:市值112亿港元 年营收3亿美元
C语言高校实验室预约登记系统
C language college laboratory reservation registration system
bonecp使用数据源
None of the strongest kings in the monitoring industry!
线代笔记....
Reprint: defect detection technology of industrial components based on deep learning
徐翔妻子应莹回应“股评”:自己写的!
epoll()无论涉及wait队列分析
POJ 2208 已知边四面体六个长度,计算体积
Crawling data encounters single point login problem
Virtual machine VirtualBox and vagrant installation
TOP命令详解
C#/VB.NET 给PDF文档添加文本/图像水印
Transport layer congestion control - slow start and congestion avoidance, fast retransmission, fast recovery
The role of applet in industrial Internet