|
|
|
@ -195,7 +195,7 @@ export default class Hydro {
|
|
|
|
|
async cacheOpen(domainId: string, pid: string, files: any[], next?) {
|
|
|
|
|
const domainDir = path.join(getConfig('cache_dir'), this.config.host, domainId);
|
|
|
|
|
const filePath = path.join(domainDir, pid); await fs.ensureDir(filePath);
|
|
|
|
|
if (!files.length) throw new SystemError('Problem data not found.');
|
|
|
|
|
if (!files?.length) throw new SystemError('Problem data not found.');
|
|
|
|
|
let etags: Record<string, string> = {};
|
|
|
|
|
try {
|
|
|
|
|
etags = JSON.parse(fs.readFileSync(path.join(filePath, 'etags')).toString());
|
|
|
|
|