场景是这样的: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?做的意义是什么?瓶颈在哪里?
边栏推荐
- 2022 CSP-J1 CSP-S1 Round 1 Preliminary Competition Registration Guide
- What practical projects can machine learning beginners learn?
- 500 miles
- [cellular automata] based on matlab interface aggregation cellular automata simulation [including Matlab source code 2004]
- Rasa 3.x Study Series - Rasa - Issues 4918 Study Notes
- Four ways the Metaverse is changing the way humans work
- 高维高斯分布基础
- RTL8762DK uses DebugAnalyzer (four)
- Unity3D study notes 10 - texture array
- SC7A20(士兰微-加速度传感器)示例
猜你喜欢

RTL8762DK RTC (5)

【 】 today in history: on July 31, "brains in vats" the birth of the participant;The father of wi-fi was born;USB 3.1 standard
![[cellular automata] based on matlab interface aggregation cellular automata simulation [including Matlab source code 2004]](/img/7b/831998e19591ce8b90cfb2eefae0d4.png)
[cellular automata] based on matlab interface aggregation cellular automata simulation [including Matlab source code 2004]

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

IDEA无法识别module(module右下角没有蓝色小方块)

Flink 部署和提交job

STK8321 I2C(昇佳-加速度传感器)示例

RTL8762DK 点灯/LED(三)
![[Data analysis] Based on matlab GUI student achievement management system [including Matlab source code 1981]](/img/65/b84443b98c28d2728e9ae44b1294fb.jpg)
[Data analysis] Based on matlab GUI student achievement management system [including Matlab source code 1981]

Key Points Estimation and Point Instance
随机推荐
Chain programming, packages, access
Luogu P3373: 线段树
彻底关闭Chrome浏览器更新及右上角的更新提示
Data Middle Office Construction (VII): Data Asset Management
ARM 交叉编译
Rasa 3.x Study Series - Rasa - Issues 4918 Study Notes
RTL8762DK RTC(五)
Fat interface in JQESAP system
设备树的树形结构到底是怎样体现的?
Detailed explanation of TCP protocol
Beijing suddenly announced that yuan universe big news
Device tree - conversion from dtb format to struct device node structure
Flink 部署和提交job
JQESAP系统里的胖接口Fat interface
Game Security 03: A Simple Explanation of Buffer Overflow Attacks
date command
MYSQL master-slave replication
OSD read SAP CRM One Order application log way of optimization
软考高级系统架构设计师系列之:系统开发基础知识
sqlserver无法远程连接