场景是这样的:A-service层需要调B-service层获取一个数据B-list,然后再用获取的B-list调用C-sevice层获取到数据C-list,最后组装B-list和C-list的数据得到A-list并返回.
求问:
1.应该是将A-list加入到redis缓存中,还是将B-list和C-list各自加入到缓存?
2.随着缓存key的增多,当一个实体数据被修改时,就要考虑涉及的缓存Key的失效,感觉很头疼,需要在更新的地方都加上新的key的失效代码,并且还要失效多个key,大家有这种困扰吗?
刚开始工作,求解答!
当前位置:网站首页>一个service层需要调用另两个service层获取数据,并组装成最后的数据,数据都是list,缓存如何设计?
一个service层需要调用另两个service层获取数据,并组装成最后的数据,数据都是list,缓存如何设计?
2022-08-01 02:23:00 【segmentfault】
其他答案1:
cache 为什么不在 B-service、C-sevice 做成 cache through?
为什么要在 A-service?做的意义是什么?瓶颈在哪里?
边栏推荐
- C string array reverse
- Solve the problem that when IDEA creates a new file by default, right-click, new, there is no XML file
- GDB 源码分析系列文章五:动态库延迟断点实现机制
- Introduction to machine learning how to?
- Completely closed Chrome updated and in the top right corner of the tip
- sqlserver cannot connect remotely
- TCP协议详解
- device node结构体转换成platform_device结构体
- MYSQL Index Analysis
- 更换树莓派内核
猜你喜欢

Beijing suddenly announced that yuan universe big news

How is the tree structure of the device tree reflected?

leetcode:1562. 查找大小为 M 的最新分组【模拟 + 端点记录 + 范围合并】

蓝图:杨辉三角排列

Game Security 03: A Simple Explanation of Buffer Overflow Attacks

【分层强化学习】HIRO:Data-Efficient Hierarchical Reinforcement Learning

MYSQL logical architecture

What practical projects can machine learning beginners learn?

IDEA调试

RTL8762DK PWM (seven)
随机推荐
现代企业架构框架1
RTL8762DK PWM (seven)
By Value or By Reference
机器学习应该如何入门?
Summary of JVM interview questions (continuously updated)
Summary of MVCC
Luogu P3373: Segment tree
Modern Enterprise Architecture Framework 1
leetcode:1648. 销售价值减少的颜色球【二分找边界】
Google Earth Engine - Error resolution of Error: Image.clipToBoundsAndScale, argument 'input': Invalid type
cmake入门学习笔记
Beijing suddenly announced that yuan universe big news
Four ways the Metaverse is changing the way humans work
链式编程、包、访问权限
SC7A20(士兰微-加速度传感器)示例
RTL8762DK WDG(六)
The kernel of the decompression process steps
RTL8762DK UART (two)
Basic implementation of vector
Unity3D study notes 10 - texture array