atomic idb nnue cache update

pull/9098/head
Niklas Fiekas 2021-06-03 16:50:43 +02:00
parent 17870be430
commit fcf83620ea
1 changed files with 2 additions and 1 deletions

View File

@ -21,7 +21,8 @@ export class Cache {
if (cachedVersion === version) {
return;
}
await idb.set(`${key}--version`, version, this.store);
await idb.del(`${key}--version`, this.store);
await idb.set(`${key}--data`, data, this.store);
await idb.set(`${key}--version`, version, this.store);
}
}