场景是这样的: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?做的意义是什么?瓶颈在哪里?
边栏推荐
- gateway gateway cross domain
- 解决安装MySQL后,Excel打开很慢的问题
- How to get started with YOLO?How to implement your own training set?
- date command
- 【数据分析】基于matlab GUI学生成绩管理系统【含Matlab源码 1981期】
- Key Points Estimation and Point Instance
- 【历史上的今天】7 月 31 日:“缸中之脑”的提出者诞生;Wi-Fi 之父出生;USB 3.1 标准发布
- The device node structure is converted into a platform_device structure
- sqlserver无法远程连接
- MYSQL query interception optimization analysis
猜你喜欢
MYSQL query interception optimization analysis
The IDEA can't find or unable to load The main class or Module "*" must not contain The source root "*" The root already belongs to The Module "*"
北京突然宣布,元宇宙重大消息
By CSDN, torn
IDEA修改注释字体
Device tree - conversion from dtb format to struct device node structure
cmake入门学习笔记
MYSQL two-phase commit
RTL8762DK WDG(六)
Compiled on unbutu with wiringPi library and run on Raspberry Pi
随机推荐
修改Postman安装路径
July Bootcamp (Day 31) - Status Compression
【密码学/密码分析】基于TMTO的密码分析方法
Replacing the Raspberry Pi Kernel
你需要知道的 TCP 四次挥手
RTL8762DK WDG(六)
【数据分析】基于matlab GUI学生成绩管理系统【含Matlab源码 1981期】
The device node structure is converted into a platform_device structure
GDB source code analysis series of articles five: dynamic library delay breakpoint implementation mechanism
C字符串数组反转
cmake入门学习笔记
/usr/sbin/vmware-authdlauncher: error while loading shared libraries: libssl.so.1.0.2*Solution
Ordinary users cannot access HGFS directory
By CSDN, torn
MYSQL query interception optimization analysis
Academicians of the two academies speak bluntly: Don't be superstitious about academicians
Chinese version of Pylint inspection rules
Modern Enterprise Architecture Framework 1
RTL8762DK PWM (seven)
机器学习初学者可以学哪些实战项目?