Remove cache only save
This commit is contained in:
@@ -13,7 +13,6 @@ const risuSession = Date.now().toFixed(0)
|
||||
const cachedForage = localforage.createInstance({name: "risuaiAccountCached"})
|
||||
|
||||
let seenWarnings:string[] = []
|
||||
let lastDbSave = 0
|
||||
|
||||
export class AccountStorage{
|
||||
auth:string
|
||||
@@ -26,16 +25,6 @@ export class AccountStorage{
|
||||
|
||||
const saveDate = Date.now().toFixed(0)
|
||||
|
||||
if(key === 'database/database.bin' && Date.now() - lastDbSave < 10000){
|
||||
console.log('saving in cache')
|
||||
//only save in cache if it's database and last save is less than 10 seconds
|
||||
await cachedForage.setItem(key, value).then(() => {
|
||||
cachedForage.setItem(key + '__date', saveDate)
|
||||
})
|
||||
return key
|
||||
}
|
||||
lastDbSave = Date.now()
|
||||
|
||||
da = await fetch(hubURL + '/api/account/write', {
|
||||
method: "POST",
|
||||
body: value,
|
||||
|
||||
Reference in New Issue
Block a user