From 89592070b5a19ffeab456cf35cd4b25d2c68216d Mon Sep 17 00:00:00 2001 From: Piyush Singhania Date: Tue, 11 Jan 2022 18:13:02 +0530 Subject: [PATCH 1/2] Added options to skipCacheDocument if needed --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 9ec09088..7f93c7b3 100644 --- a/index.js +++ b/index.js @@ -226,8 +226,8 @@ module.exports = { return this.metaCache[doctype]; }, - async getDoc(doctype, name) { - let doc = this.getDocFromCache(doctype, name); + async getDoc(doctype, name, options = {skipCacheDocument: false}) { + let doc = options.skipCacheDocument ? null : this.getDocFromCache(doctype, name); if (!doc) { doc = new (this.getDocumentClass(doctype))({ doctype: doctype, From 9459b66148a1275b3fd9f82d6c7c8740089c7a33 Mon Sep 17 00:00:00 2001 From: Piyush Singhania Date: Tue, 11 Jan 2022 19:10:32 +0530 Subject: [PATCH 2/2] Renamed to skipDocumentCache --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 7f93c7b3..9091236d 100644 --- a/index.js +++ b/index.js @@ -226,8 +226,8 @@ module.exports = { return this.metaCache[doctype]; }, - async getDoc(doctype, name, options = {skipCacheDocument: false}) { - let doc = options.skipCacheDocument ? null : this.getDocFromCache(doctype, name); + async getDoc(doctype, name, options = {skipDocumentCache: false}) { + let doc = options.skipDocumentCache ? null : this.getDocFromCache(doctype, name); if (!doc) { doc = new (this.getDocumentClass(doctype))({ doctype: doctype,