aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/cache
diff options
context:
space:
mode:
Diffstat (limited to 'server/lib/cache')
-rw-r--r--server/lib/cache/abstract-video-static-file-cache.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/server/lib/cache/abstract-video-static-file-cache.ts b/server/lib/cache/abstract-video-static-file-cache.ts
index 3e20c5d2a..7512f2b9d 100644
--- a/server/lib/cache/abstract-video-static-file-cache.ts
+++ b/server/lib/cache/abstract-video-static-file-cache.ts
@@ -1,6 +1,5 @@
1import * as AsyncLRU from 'async-lru' 1import * as AsyncLRU from 'async-lru'
2import { createWriteStream } from 'fs-extra' 2import { createWriteStream, remove } from 'fs-extra'
3import { unlinkPromise } from '../../helpers/core-utils'
4import { logger } from '../../helpers/logger' 3import { logger } from '../../helpers/logger'
5import { VideoModel } from '../../models/video/video' 4import { VideoModel } from '../../models/video/video'
6import { fetchRemoteVideoStaticFile } from '../activitypub' 5import { fetchRemoteVideoStaticFile } from '../activitypub'
@@ -26,7 +25,7 @@ export abstract class AbstractVideoStaticFileCache <T> {
26 }) 25 })
27 26
28 this.lru.on('evict', (obj: { key: string, value: string }) => { 27 this.lru.on('evict', (obj: { key: string, value: string }) => {
29 unlinkPromise(obj.value) 28 remove(obj.value)
30 .then(() => logger.debug('%s evicted from %s', obj.value, this.constructor.name)) 29 .then(() => logger.debug('%s evicted from %s', obj.value, this.constructor.name))
31 }) 30 })
32 } 31 }