给统计缓存加版本并绑定现有基础数据/课表失效标签,同时让演示数据、人员数据写入主动清理统计缓存;不改统计口径、筛选、导出或页面结构。

This commit is contained in:
biss committed 2026-07-26 21:32:51 +08:00
1 parent 034f1eacb8
commit b39a57ebdf
7 files changed
+35 -2

No files matched your search

@@ -437,6 +437,9 @@ public sealed class PersonnelController(
await cache.RemoveByTagAsync( await cache.RemoveByTagAsync(
AppCacheTags.Timetables, AppCacheTags.Timetables,
cancellationToken); cancellationToken);
await cache.RemoveByTagAsync(
AppCacheTags.Analytics,
cancellationToken);
return Created(string.Empty, new { id }); return Created(string.Empty, new { id });
} }
catch (DbUpdateException) catch (DbUpdateException)
@@ -453,6 +456,9 @@ public sealed class PersonnelController(
await cache.RemoveByTagAsync( await cache.RemoveByTagAsync(
AppCacheTags.Timetables, AppCacheTags.Timetables,
cancellationToken); cancellationToken);
await cache.RemoveByTagAsync(
AppCacheTags.Analytics,
cancellationToken);
return NoContent(); return NoContent();
} }
catch (DbUpdateException) catch (DbUpdateException)
@@ -147,6 +147,9 @@ public sealed class PersonnelExcelController(
await cache.RemoveByTagAsync( await cache.RemoveByTagAsync(
AppCacheTags.Timetables, AppCacheTags.Timetables,
cancellationToken); cancellationToken);
await cache.RemoveByTagAsync(
AppCacheTags.Analytics,
cancellationToken);
return Ok(result); return Ok(result);
} }
catch (DbUpdateException) catch (DbUpdateException)
@@ -966,7 +966,11 @@ public sealed class StatisticsController(
source.Value.GetType()); source.Value.GetType());
}, },
AppCacheProfile.Analytics, AppCacheProfile.Analytics,
[AppCacheTags.Analytics], [
AppCacheTags.Analytics,
AppCacheTags.BaseData,
AppCacheTags.Timetables
],
cancellationToken); cancellationToken);
return value; return value;
} }
Loaded 3 of 7 files, more files were not shown because too many files have changed in this diff. Show more