fix(caching): properly respect ttl for all cache levels

This commit is contained in:
2021-05-10 14:26:32 +00:00
parent f7b6df5ff7
commit 6b57e8b1f3
7 changed files with 88 additions and 20 deletions

View File

@@ -64,7 +64,18 @@ export class CacheS3Manager extends AbstractCache {
return false;
}
public async clean() {
public async deleteCacheEntryByKey(keyArg: string) {
if(this.status === 'active') {
await this.s3CacheDir.fastRemove(encodeURIComponent(keyArg));
}
}
/**
* clean outdated
*/
public async cleanOutdated() {}
public async cleanAll() {
await this.s3CacheDir.deleteWithAllContents();
}
}