Skip to content

Commit

Permalink
fix: cache wasn't properly cleaning expired keys
Browse files Browse the repository at this point in the history
  • Loading branch information
pilar6195 committed Jul 1, 2024
1 parent 8ca2dbb commit 91a51e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/Cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ const Cache = {
},

async _cleanStore(store: LocalForage) {
return store.iterate(async (value: any, key: string) => {
return store.iterate((value: any, key: string) => {
if (Date.now() > value.ttl) {
return store.removeItem(key);
void store.removeItem(key);
}
});
},
Expand Down

0 comments on commit 91a51e5

Please sign in to comment.