场景是这样的: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?做的意义是什么?瓶颈在哪里?
边栏推荐
- 元宇宙改变人类工作模式的四种方式
- RTL8762DK WDG (six)
- Item 36: Specify std::launch::async if asynchronicity is essential.
- Basic use of vim - command mode
- What is the meaning of JS timestamp?Know SQL will consider to add a timestamp, JS timestamp for the scene?
- Super like the keyboard made from zero, IT people love it
- 蓝图:杨辉三角排列
- 更换树莓派内核
- Flink 部署和提交job
- YOLO怎么入门?怎么实现自己的训练集?
猜你喜欢

ARM cross compilation

IDEA does not recognize the module (there is no blue square in the lower right corner of the module)

Replacing the Raspberry Pi Kernel

leetcode:1648. 销售价值减少的颜色球【二分找边界】

You need to know the TCP wave four times

更换树莓派内核

【密码学/密码分析】基于TMTO的密码分析方法

RTL8762DK UART(二)

解决IDEA默认情况下新建文件时,右击,new,没有XML文件的问题

Flink deploys and submits jobs
随机推荐
IDEA debugging
Compiled on unbutu with wiringPi library and run on Raspberry Pi
设备树——dtb格式到struct device node结构体的转换
lua entry case combat 123DIY
Academicians of the two academies speak bluntly: Don't be superstitious about academicians
By CSDN, torn
GDB 源码分析系列文章五:动态库延迟断点实现机制
IDEA modifies the annotation font
Four ways the Metaverse is changing the way humans work
Luogu P3373: Segment tree
ARM 交叉编译
OSD读取SAP CRM One Order应用日志的优化方式
Solve the problem that when IDEA creates a new file by default, right-click, new, there is no XML file
Detailed explanation of TCP protocol
leetcode: 1562. Find latest grouping of size M [simulation + endpoint record + range merge]
彻底关闭Chrome浏览器更新及右上角的更新提示
What is the meaning of JS timestamp?Know SQL will consider to add a timestamp, JS timestamp for the scene?
Chain programming, packages, access
在打开MYSQL表时,有的可以显示编辑,有的没有,如何设置。
ECCV2022 Workshop | Multi-Object Tracking and Segmentation in Complex Environments