re-enable cache

This commit is contained in:
TheBeastLT
2023-02-26 10:50:49 +01:00
parent bd00282e64
commit 78770dc14c
2 changed files with 4 additions and 4 deletions

View File

@@ -27,10 +27,10 @@ builder.defineStreamHandler((args) => {
return Promise.resolve({ streams: [] });
}
return limiter.schedule(() => streamHandler(args)
return cacheWrapStream(args.id, () => limiter.schedule(() => streamHandler(args)
.then(records => records
.sort((a, b) => b.torrent.seeders - a.torrent.seeders || b.torrent.uploadDate - a.torrent.uploadDate)
.map(record => toStreamInfo(record))))
.map(record => toStreamInfo(record)))))
.then(streams => applyFilters(streams, args.extra))
.then(streams => applySorting(streams, args.extra))
.then(streams => applyStaticInfo(streams))