mirror of
https://github.com/TheBeastLT/torrentio-scraper.git
synced 2026-03-11 17:15:37 +00:00
fix cache keys
This commit is contained in:
parent
10c13268ab
commit
286a603991
1 changed files with 2 additions and 2 deletions
|
|
@ -28,7 +28,7 @@ builder.defineCatalogHandler((args) => {
|
|||
return Promise.reject(`No catalog found for with id: ${args.id}`)
|
||||
}
|
||||
|
||||
const cacheKey = `${args.id}|${genre}|${offset}`
|
||||
const cacheKey = `${args.id}|${genre}|${dateKey()}|${offset}`
|
||||
return limiter.schedule(() => cacheWrapCatalog(cacheKey, () => getCatalog(catalog, genre, offset)))
|
||||
.then(metas => ({
|
||||
metas: metas,
|
||||
|
|
@ -53,7 +53,7 @@ async function getCatalog(catalog, genre, offset) {
|
|||
const cursor = await getCursor(catalog, genre, offset)
|
||||
const startDate = getStartDate(genre)?.toISOString();
|
||||
const endDate = getEndDate(genre)?.toISOString();
|
||||
const cacheKey = `${catalog.id}|${genre}||${dateKey()}`
|
||||
const cacheKey = `${catalog.id}|${genre}|${dateKey()}`
|
||||
|
||||
return cacheWrapIds(cacheKey, () => repository.getIds(catalog.type, startDate, endDate))
|
||||
.then(ids => ids.slice(ids.indexOf(cursor) + 1))
|
||||
|
|
|
|||
Loading…
Reference in a new issue