mirror of
https://github.com/frappe/books.git
synced 2024-12-24 20:00:29 +00:00
Merge pull request #158 from piyushsinghania/add/skipcache
Added options to skipCacheDocument if ever needed
This commit is contained in:
commit
6a298716d9
4
index.js
4
index.js
@ -226,8 +226,8 @@ module.exports = {
|
|||||||
return this.metaCache[doctype];
|
return this.metaCache[doctype];
|
||||||
},
|
},
|
||||||
|
|
||||||
async getDoc(doctype, name) {
|
async getDoc(doctype, name, options = {skipDocumentCache: false}) {
|
||||||
let doc = this.getDocFromCache(doctype, name);
|
let doc = options.skipDocumentCache ? null : this.getDocFromCache(doctype, name);
|
||||||
if (!doc) {
|
if (!doc) {
|
||||||
doc = new (this.getDocumentClass(doctype))({
|
doc = new (this.getDocumentClass(doctype))({
|
||||||
doctype: doctype,
|
doctype: doctype,
|
||||||
|
Loading…
Reference in New Issue
Block a user