cache-sync.module.ts 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // apps/box-mgnt-api/src/cache-sync/cache-sync.module.ts
  2. import { Module } from '@nestjs/common';
  3. import { CacheSyncService } from './cache-sync.service';
  4. import { CacheSyncDebugController } from './cache-sync-debug.controller';
  5. import { CacheChecklistService } from './cache-checklist.service';
  6. import { CacheChecklistController } from './cache-checklist.controller';
  7. import { VideoCacheAdminController } from './admin/video-cache-admin.controller';
  8. import { CacheManagerModule } from '@box/core/cache/cache-manager.module';
  9. /**
  10. * CacheSyncModule
  11. *
  12. * Production-safe cache synchronization module.
  13. *
  14. * Contains:
  15. * - CacheSyncService: Background cache sync job
  16. * - CacheSyncDebugController: Debug-only checklist endpoints
  17. * - CacheChecklistService: Cache integrity checking
  18. * - VideoCacheAdminController: PRODUCTION admin endpoint for cache rebuild
  19. *
  20. * Dev-only endpoints (debugging, statistics, raw key inspection) are isolated
  21. * in DevVideoCacheModule and conditionally imported in AppModule based on NODE_ENV.
  22. *
  23. * See also: apps/box-mgnt-api/src/dev/dev-video-cache.module.ts
  24. */
  25. @Module({
  26. imports: [CacheManagerModule],
  27. controllers: [
  28. CacheSyncDebugController,
  29. CacheChecklistController,
  30. VideoCacheAdminController,
  31. ],
  32. providers: [CacheSyncService, CacheChecklistService],
  33. exports: [CacheSyncService, CacheChecklistService],
  34. })
  35. export class CacheSyncModule {}