Skip to content

Commit

Permalink
fix(front): correct tiles clean cache time computation
Browse files Browse the repository at this point in the history
  • Loading branch information
agviegas committed Aug 9, 2024
1 parent 8d3099c commit 90a4fdd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/front/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@thatopen/components-front",
"description": "Collection of frontend tools to author BIM apps.",
"version": "2.1.22",
"version": "2.1.23",
"author": "That Open Company",
"contributors": [
"Antonio Gonzalez Viegas (https://github.com/agviegas)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class StreamerDbCleaner {
return;
}
this._intervalId = window.setInterval(() => {
const now = performance.now();
const now = new Date().getTime();
for (const [id, time] of this.list) {
const age = now - time;
if (age > this.maxTime) {
Expand All @@ -43,7 +43,7 @@ export class StreamerDbCleaner {
update(id: string) {
if (!this.enabled) return;
// console.log(`Added to indexedDB: ${id}`);
this.list.set(id, performance.now());
this.list.set(id, new Date().getTime());
}

async clear() {
Expand Down

0 comments on commit 90a4fdd

Please sign in to comment.