Skip to content

Commit 2709beb

Browse files
committed
perf: add getGroupBasicInfo request cache
1 parent 7b699ca commit 2709beb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

server/services/core/group/group.service.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ class GroupService extends TcService {
5050
params: {
5151
groupId: 'string',
5252
},
53+
cache: {
54+
keys: ['groupId'],
55+
ttl: 60 * 60, // 1 hour
56+
},
5357
});
5458
this.registerAction('getGroupInfo', this.getGroupInfo, {
5559
params: {
@@ -1204,6 +1208,7 @@ class GroupService extends TcService {
12041208
* @param groupId 群组id
12051209
*/
12061210
private cleanGroupInfoCache(groupId: string) {
1211+
this.cleanActionCache('getGroupBasicInfo', [groupId]);
12071212
this.cleanActionCache('getGroupInfo', [groupId]);
12081213
}
12091214

0 commit comments

Comments
 (0)