feat: implement caching for recent activity count to optimize performance and reduce database load

This commit is contained in:
Dries Augustyns
2026-05-10 11:37:31 +02:00
parent de6335e999
commit f22da4add1
3 changed files with 585 additions and 54 deletions
+3
View File
@@ -53,6 +53,9 @@ export const Keys = {
stats(projectId: string, startTime: number | string, endTime: number | string): string {
return `activity:stats:${projectId}:${startTime}:${endTime}`;
},
recentCount(projectId: string, minutes: number): string {
return `activity:recent-count:${projectId}:${minutes}`;
},
},
Analytics: {
timeseries(projectId: string, startDate: string, endDate: string): string {