aboutsummaryrefslogtreecommitdiff
path: root/src/services/file-cache.ts
AgeCommit message (Collapse)AuthorFilesLines
2023-05-13Fix caching (#941)Max Isom1-17/+13
2022-01-05Setup and migrate to Prisma (#456)Peerawas Archavanuntakun1-24/+61
2021-12-07Check database direction for orphansMax Isom1-0/+66
2021-12-03Revert back to static propertyMax Isom1-3/+3
2021-12-03Use loop instead of recursionMax Isom1-8/+27
2021-12-03Update debug loggingMax Isom1-8/+5
2021-12-03Return when queue is emptyMax Isom1-7/+9
2021-12-03Disable @typescript-eslint/no-implicit-any-catchMax Isom1-2/+2
(Strict mode in TS 4.4 enables useUnknownInCatchVariables, so this is redundant.)
2021-12-03add some debug logsHellyson Rodrigo Parteka1-1/+7
2021-12-03fix(file-cache): add queue to handle eviction of old filesHellyson Rodrigo Parteka1-4/+12
This commit also removes the `await` from every stream creation. The eviction will be handled totally assyncronously. The only drawback is the possibility of exceeding the cache limit for a moment, until the next execution of `evictOldest`. This will only be a problem if the cache is set too close to the remaining disk space, which I wouldn't recomend. I also removed the recursion.
2021-12-03fix(file-cache): try/catch to prevent concurrency issuesHellyson Rodrigo Parteka1-3/+7
2021-11-24Change event to closeMax Isom1-2/+2
2021-11-19Add .removeOrphans()Max Isom1-3/+11
2021-11-19Move file caching logic to new FileCache serviceMax Isom1-0/+109
Also: removes the -re ffmpeg option. If this option is passed, ffmpeg won't write to fs-capacitor (and the cache file) as fast as possible. In other words, the cache file won't finish writing until the entire stream has been played.