Successfully consolidated the video category/tag cache builder to use only the core version. Eliminated the duplicate app-level builder and wired the core builder into the box-mgnt-api cache warmup flow.
Deleted file:
apps/box-mgnt-api/src/cache/video-category-cache.builder.tsVerification:
adpool-warmup.service.ts, video-category-warmup.service.ts, video-list-cache.builder.ts, video-list-warmup.service.tsCreated index files for proper module organization:
libs/core/src/cache/video/index.ts
export {
VideoCategoryCacheBuilder,
VideoCategoryPayload,
VideoTagPayload,
} from './video-category-cache.builder';
export { VideoCategoryWarmupService } from './video-category-warmup.service';
libs/core/src/cache/index.ts (top-level cache exports)
export * from './video';
export * from './category';
export * from './tag';
export * from './channel';
libs/core/src/cache/{category,tag,channel}/index.ts (supporting modules)
Updated: apps/box-mgnt-api/src/cache/video-category-warmup.service.ts
import { VideoCategoryCacheBuilder } from '@box/core/cache/video';
@Injectable()
export class VideoCategoryWarmupService implements OnModuleInit {
constructor(private readonly builder: VideoCategoryCacheBuilder) {}
async onModuleInit(): Promise<void> {
await this.builder.buildAll();
// ...
}
}
Updated: apps/box-mgnt-api/src/app.module.ts
import { VideoCategoryCacheBuilder } from './cache/video-category-cache.builder';VideoCategoryCacheBuilder from providers arrayVideoCategoryWarmupService which now imports from coreTest Suite Results:
Architecture Verification:
BaseCacheBuilder@box/core/cache/videoNow use these clean import paths across the project:
// Video category/tag caching
import {
VideoCategoryCacheBuilder,
VideoCategoryPayload,
VideoTagPayload,
} from '@box/core/cache/video';
// Top-level cache access (when needed)
import {} from /* any cache component */ '@box/core/cache';
libs/core/src/cache/
├── cache-manager.module.ts (exports all cache builders)
├── index.ts (barrel exports)
├── video/
│ ├── video-category-cache.builder.ts (canonical)
│ ├── video-category-warmup.service.ts
│ └── index.ts (exports)
├── category/
│ ├── category-cache.builder.ts
│ ├── category-cache.service.ts
│ ├── category-warmup.service.ts
│ └── index.ts
├── tag/
│ ├── tag-cache.builder.ts
│ ├── tag-cache.service.ts
│ ├── tag-warmup.service.ts
│ └── index.ts
└── channel/
├── channel-cache.builder.ts
├── channel-cache.service.ts
├── channel-warmup.service.ts
└── index.ts
apps/box-mgnt-api/src/cache/
├── adpool-warmup.service.ts (local - not migrated)
├── video-category-warmup.service.ts (imports core builder)
├── video-list-cache.builder.ts (local - app-specific)
└── video-list-warmup.service.ts (local)
VideoCategoryCacheBuilder in core@box/core/cache/video path for video buildersIf you need to create additional cache builders:
libs/core/src/cache/{entity}/