fix(core): update

This commit is contained in:
Philipp Kunz 2021-04-29 20:44:47 +00:00
parent ab1e83b8bf
commit 952399c26e

View File

@ -22,9 +22,11 @@ export class RegistryCache {
} }
public async cacheSmartFile (fileIdArg: string, smartfileArg: plugins.smartfile.Smartfile) { public async cacheSmartFile (fileIdArg: string, smartfileArg: plugins.smartfile.Smartfile) {
await this.levelCache.storeCacheEntryByKey(fileIdArg, new plugins.levelcache.CacheEntry({ if (smartfileArg) {
contents: Buffer.from(smartfileArg.foldToJson()), await this.levelCache.storeCacheEntryByKey(fileIdArg, new plugins.levelcache.CacheEntry({
ttl: 60000 contents: Buffer.from(smartfileArg.foldToJson()),
})); ttl: 60000
}));
}
} }
} }