|
@@ -12,57 +12,36 @@ export type VideoSortKey = 'latest' | 'popular' | 'manual';
|
|
|
export type VideoHomeSectionKey = 'featured' | 'latest' | 'editorPick';
|
|
export type VideoHomeSectionKey = 'featured' | 'latest' | 'editorPick';
|
|
|
|
|
|
|
|
export const CacheKeys = {
|
|
export const CacheKeys = {
|
|
|
- // ─────────────────────────────────────────────
|
|
|
|
|
- // CHANNELS
|
|
|
|
|
- // ─────────────────────────────────────────────
|
|
|
|
|
appChannelAll: 'box:app:channel:all',
|
|
appChannelAll: 'box:app:channel:all',
|
|
|
appChannelById: (channelId: string | number): string =>
|
|
appChannelById: (channelId: string | number): string =>
|
|
|
- `box:app:channel:by-id:${channelId}`,
|
|
|
|
|
|
|
+ `box:app:channel:id:${channelId}`,
|
|
|
|
|
|
|
|
appChannelWithCategories: (channelId: string | number): string =>
|
|
appChannelWithCategories: (channelId: string | number): string =>
|
|
|
`box:app:channel:with-categories:${channelId}`,
|
|
`box:app:channel:with-categories:${channelId}`,
|
|
|
|
|
|
|
|
- // ─────────────────────────────────────────────
|
|
|
|
|
- // CATEGORIES
|
|
|
|
|
- // ─────────────────────────────────────────────
|
|
|
|
|
appCategory: (categoryId: string | number): string =>
|
|
appCategory: (categoryId: string | number): string =>
|
|
|
`box:app:category:${categoryId}`,
|
|
`box:app:category:${categoryId}`,
|
|
|
appCategoryAll: 'box:app:category:all',
|
|
appCategoryAll: 'box:app:category:all',
|
|
|
appCategoryById: (categoryId: string | number): string =>
|
|
appCategoryById: (categoryId: string | number): string =>
|
|
|
- `box:app:category:by-id:${categoryId}`,
|
|
|
|
|
|
|
+ `box:app:category:id:${categoryId}`,
|
|
|
|
|
|
|
|
appCategoryWithTags: (categoryId: string | number): string =>
|
|
appCategoryWithTags: (categoryId: string | number): string =>
|
|
|
`box:app:category:with-tags:${categoryId}`,
|
|
`box:app:category:with-tags:${categoryId}`,
|
|
|
|
|
|
|
|
- // ─────────────────────────────────────────────
|
|
|
|
|
- // TAGS
|
|
|
|
|
- // ─────────────────────────────────────────────
|
|
|
|
|
appTagAll: 'box:app:tag:all',
|
|
appTagAll: 'box:app:tag:all',
|
|
|
|
|
|
|
|
appTagByCategoryKey: (categoryId: string | number): string =>
|
|
appTagByCategoryKey: (categoryId: string | number): string =>
|
|
|
`box:app:tag:list:${categoryId}`,
|
|
`box:app:tag:list:${categoryId}`,
|
|
|
|
|
|
|
|
- // ─────────────────────────────────────────────
|
|
|
|
|
- // ADS
|
|
|
|
|
- // ─────────────────────────────────────────────
|
|
|
|
|
- // ─────────────────────────────────────────────
|
|
|
|
|
- // AD POOLS (AdType-based)
|
|
|
|
|
- // ─────────────────────────────────────────────
|
|
|
|
|
appAdPoolByType: (adType: AdType | string): string =>
|
|
appAdPoolByType: (adType: AdType | string): string =>
|
|
|
`box:app:adpool:${adType}`,
|
|
`box:app:adpool:${adType}`,
|
|
|
|
|
|
|
|
- // ─────────────────────────────────────────────
|
|
|
|
|
- // VIDEO LISTS
|
|
|
|
|
- // ─────────────────────────────────────────────
|
|
|
|
|
appHomeVideoPage: (page: number): string =>
|
|
appHomeVideoPage: (page: number): string =>
|
|
|
`box:app:videolist:home:page:${page}`,
|
|
`box:app:videolist:home:page:${page}`,
|
|
|
|
|
|
|
|
appChannelVideoPage: (channelId: string | number, page: number): string =>
|
|
appChannelVideoPage: (channelId: string | number, page: number): string =>
|
|
|
`box:app:videolist:channel:${channelId}:page:${page}`,
|
|
`box:app:videolist:channel:${channelId}:page:${page}`,
|
|
|
|
|
|
|
|
- // ─────────────────────────────────────────────
|
|
|
|
|
- // VIDEO DETAILS & METADATA
|
|
|
|
|
- // ─────────────────────────────────────────────
|
|
|
|
|
appVideoDetailKey: (videoId: string): string =>
|
|
appVideoDetailKey: (videoId: string): string =>
|
|
|
`box:app:video:detail:${videoId}`,
|
|
`box:app:video:detail:${videoId}`,
|
|
|
|
|
|
|
@@ -75,9 +54,6 @@ export const CacheKeys = {
|
|
|
appVideoTagListKey: (categoryId: string, tagId: string): string =>
|
|
appVideoTagListKey: (categoryId: string, tagId: string): string =>
|
|
|
`box:app:video:tag:list:${categoryId}:${tagId}`,
|
|
`box:app:video:tag:list:${categoryId}:${tagId}`,
|
|
|
|
|
|
|
|
- // ─────────────────────────────────────────────
|
|
|
|
|
- // VIDEO POOLS
|
|
|
|
|
- // ─────────────────────────────────────────────
|
|
|
|
|
appVideoCategoryPoolKey: (
|
|
appVideoCategoryPoolKey: (
|
|
|
channelId: string,
|
|
channelId: string,
|
|
|
categoryId: string,
|
|
categoryId: string,
|
|
@@ -90,14 +66,9 @@ export const CacheKeys = {
|
|
|
sort: VideoSortKey,
|
|
sort: VideoSortKey,
|
|
|
): string => `box:app:video:list:tag:${channelId}:${tagId}:${sort}`,
|
|
): string => `box:app:video:list:tag:${channelId}:${tagId}:${sort}`,
|
|
|
|
|
|
|
|
- appVideoHomeSectionKey: (
|
|
|
|
|
- channelId: string,
|
|
|
|
|
- section: string,
|
|
|
|
|
- ): string => `box:app:video:list:home:${channelId}:${section}`,
|
|
|
|
|
|
|
+ appVideoHomeSectionKey: (channelId: string, section: string): string =>
|
|
|
|
|
+ `box:app:video:list:home:${channelId}:${section}`,
|
|
|
|
|
|
|
|
- // ─────────────────────────────────────────────
|
|
|
|
|
- // RECOMMENDED VIDEOS
|
|
|
|
|
- // ─────────────────────────────────────────────
|
|
|
|
|
appRecommendedVideos: 'box:app:video:recommended',
|
|
appRecommendedVideos: 'box:app:video:recommended',
|
|
|
appVideoLatest: 'box:app:video:latest',
|
|
appVideoLatest: 'box:app:video:latest',
|
|
|
appVideoList: 'box:app:video:list',
|
|
appVideoList: 'box:app:video:list',
|