From ae93647777d26c870a968ab6f2b79d62bf6390ea Mon Sep 17 00:00:00 2001 From: NullVoxPopuli Date: Thu, 16 Dec 2021 19:14:41 -0500 Subject: [PATCH] Use more explicit cacheKeyForTree --- packages/ember/src/index.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/ember/src/index.ts b/packages/ember/src/index.ts index 0411d03..7539322 100644 --- a/packages/ember/src/index.ts +++ b/packages/ember/src/index.ts @@ -138,7 +138,16 @@ module.exports = { // Re-enables caching of this addon, due to opting out // of the caching implicitly by specifying treeFor* methods cacheKeyForTree(treeType) { - return cacheKeyForTree(treeType, this); + switch (treeType) { + case 'app': { + const sources = (this.docfyConfig as DocfyConfig).sources + .map((item) => item.root) + .join(','); + return cacheKeyForTree(treeType, this, [sources]); + } + default: + return cacheKeyForTree(treeType, this); + } }, treeForApp(tree: Node): Node {