fix caching issue with no related data
This commit is contained in:
parent
5245125097
commit
15deeddd14
|
@ -63,6 +63,8 @@ export const fetchXNXXVideoData = async (videoId: string, params?: FetchParams):
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
await storeDataIntoRedis(queryUrl, data, DEFAULT_XNXX_CONTENT_EXPIRY);
|
||||||
|
|
||||||
// populate related gallery
|
// populate related gallery
|
||||||
scriptTags.map((idx, elem) => {
|
scriptTags.map((idx, elem) => {
|
||||||
const relatedVideos = findRelatedVideos($(elem).toString(), Platforms.xnxx)
|
const relatedVideos = findRelatedVideos($(elem).toString(), Platforms.xnxx)
|
||||||
|
@ -73,7 +75,6 @@ export const fetchXNXXVideoData = async (videoId: string, params?: FetchParams):
|
||||||
})
|
})
|
||||||
|
|
||||||
await storeDataIntoRedis(queryUrl + DEFAULT_RELATED_VIDEO_KEY_PATH, related, DEFAULT_XNXX_CONTENT_EXPIRY);
|
await storeDataIntoRedis(queryUrl + DEFAULT_RELATED_VIDEO_KEY_PATH, related, DEFAULT_XNXX_CONTENT_EXPIRY);
|
||||||
await storeDataIntoRedis(queryUrl, data, DEFAULT_XNXX_CONTENT_EXPIRY);
|
|
||||||
|
|
||||||
}).catch((error: AxiosError) => {
|
}).catch((error: AxiosError) => {
|
||||||
// handle errors
|
// handle errors
|
||||||
|
|
|
@ -63,6 +63,8 @@ export const fetchXvideosVideoData = async (videoId: string, params?: FetchParam
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
await storeDataIntoRedis(queryUrl, data, DEFAULT_XVIDEOS_CONTENT_EXPIRY);
|
||||||
|
|
||||||
// populate related gallery
|
// populate related gallery
|
||||||
scriptTags.map((idx, elem) => {
|
scriptTags.map((idx, elem) => {
|
||||||
const relatedVideos = findRelatedVideos($(elem).toString(), Platforms.xvideos)
|
const relatedVideos = findRelatedVideos($(elem).toString(), Platforms.xvideos)
|
||||||
|
@ -73,7 +75,6 @@ export const fetchXvideosVideoData = async (videoId: string, params?: FetchParam
|
||||||
})
|
})
|
||||||
|
|
||||||
await storeDataIntoRedis(queryUrl + DEFAULT_RELATED_VIDEO_KEY_PATH, related, DEFAULT_XVIDEOS_CONTENT_EXPIRY);
|
await storeDataIntoRedis(queryUrl + DEFAULT_RELATED_VIDEO_KEY_PATH, related, DEFAULT_XVIDEOS_CONTENT_EXPIRY);
|
||||||
await storeDataIntoRedis(queryUrl, data, DEFAULT_XVIDEOS_CONTENT_EXPIRY);
|
|
||||||
|
|
||||||
}).catch((error: AxiosError) => {
|
}).catch((error: AxiosError) => {
|
||||||
// handle errors
|
// handle errors
|
||||||
|
|
Loading…
Reference in New Issue