diff --git a/frontend/models/Document.js b/frontend/models/Document.js index dbde53e3c..4f4c760ef 100644 --- a/frontend/models/Document.js +++ b/frontend/models/Document.js @@ -40,7 +40,6 @@ class Document extends BaseModel { views: number; data: Object; - fetchedAt: Date; /* Computed */ @@ -102,10 +101,6 @@ class Document extends BaseModel { : null; } - get timeSinceFetch(): number { - return (new Date() - this.fetchedAt) / 1000; - } - /* Actions */ @action star = async () => { @@ -250,7 +245,6 @@ class Document extends BaseModel { if (dirty) this.hasPendingChanges = true; this.data = data; extendObservable(this, data); - this.fetchedAt = new Date(); } constructor(data?: Object = {}) { diff --git a/frontend/stores/DocumentsStore.js b/frontend/stores/DocumentsStore.js index 817b11456..6314d1b05 100644 --- a/frontend/stores/DocumentsStore.js +++ b/frontend/stores/DocumentsStore.js @@ -116,11 +116,6 @@ class DocumentsStore extends BaseStore { }; @action fetch = async (id: string, prefetch?: boolean): Promise<*> => { - /** If document has been fetched under 5s ago, return it */ - const existingDocument = this.getById(id); - if (existingDocument && existingDocument.timeSinceFetch < 5) - return existingDocument; - if (!prefetch) this.isFetching = true; try {