当前位置:网站首页>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 10:44:00 【热爱生活的猴子】
一、错误提示
我在删除缓存的时候报了这个错:WRONGTYPE Operation against a key holding the wrong kind of value
二、错误含义
针对持有错误类型值的键的错误类型操作
三、出现错误的原因
我在保存缓存的时候使用的是zset结构:
redisTemplate.opsForSet().add(key,value);
但是我在删除的时候这个缓存的时候使用的是:
redisTemplate.opsForZSet().remove(key,value);
所以因为数据结构不一致导致,删除时报错。
四、解决办法
删除缓存结构时改成Set:
redisTemplate.opsForSet().remove(key,value);
保持保存和删除时结构一致。
这是我实际工作中遇到的问题,希望对你有帮助~
边栏推荐
- The third season of Baidu online AI competition is coming in midsummer, looking for you who love AI!
- 线代笔记....
- 深度循环网络长期血压预测【翻译】
- Echart simple component packaging
- Execution process of MySQL query request - underlying principle
- Use cpolar to build a business website (1)
- 2022暑期项目实训(二)
- There is a sound prompt when inserting a USB flash disk under win10 system, but the drive letter is not displayed
- 2022暑期项目实训(一)
- 用友OA漏洞学习——NCFindWeb 目录遍历漏洞
猜你喜欢

On time and parameter selection of asemi rectifier bridge db207

Compilation Principle -- C language implementation of prediction table

Recursive way

ORACLE进阶(四)表连接讲解

win10系统下插入U盘有声音提示却不显示盘符

测试行业的小伙伴,有问题可以找我哈。菜鸟一枚~

Introduction and case analysis of Prophet model

Self-supervised Heterogeneous Graph Neural Network with Co-contrastive Learning 论文阅读

Rb157-asemi rectifier bridge RB157

Excellent open source fonts for programmers
随机推荐
從交互模型中蒸餾知識!中科大&美團提出VIRT,兼具雙塔模型的效率和交互模型的性能,在文本匹配上實現性能和效率的平衡!...
Using block to realize the traditional values between two pages
Recursive way
How does crmeb mall system help marketing?
Self supervised heterogeneous graph neural network with CO comparative learning
测试行业的小伙伴,有问题可以找我哈。菜鸟一枚~
SAP Fiori 应用索引大全工具和 SAP Fiori Tools 的使用介绍
Prophet模型的简介以及案例分析
Atcoder a mountaineer
安装及管理程序
MySQL查询请求的执行过程——底层原理
Penetration test information collection - basic enterprise information
重磅硬核 | 一文聊透对象在 JVM 中的内存布局,以及内存对齐和压缩指针的原理及应用
Rb157-asemi rectifier bridge RB157
文档编辑之markdown语法(typora)
Cocos2d Lua smaller and smaller sample memory game
bonecp使用数据源
Docker installation redis
SQL优化问题的简述
Cocos2d Lua 越来越小样本 内存游戏