refactoring

This commit is contained in:
Emily
2025-03-06 10:55:46 +01:00
parent 63fa3995c5
commit 942d074f99
28 changed files with 253 additions and 83 deletions

View File

@@ -12,17 +12,18 @@ export default defineEventHandler(async event => {
const cacheKey = `timeline:visits:${pid}:${slice}:${from}:${to}:${domain}`;
const cacheExp = 20;
return await Redis.useCacheV2(cacheKey, cacheExp, async () => {
const timelineData = await executeAdvancedTimelineAggregation({
projectId: project_id,
model: VisitModel,
from, to, slice, timeOffset, domain
});
return timelineData;
// return await Redis.useCacheV2(cacheKey, cacheExp, async () => {
const timelineData = await executeAdvancedTimelineAggregation({
projectId: project_id,
model: VisitModel,
from, to, slice, timeOffset, domain,
debug: true
});
return timelineData;
// });