Skip to content

Commit

Permalink
fix(core): fix default value for cache.enabled
Browse files Browse the repository at this point in the history
Previously it was required to have the `cache.enabled` explicitly enabled
even with ts-morph provider, otherwise CLI cache commands would fail to run.
  • Loading branch information
B4nan committed Aug 11, 2020
1 parent 4c45e00 commit 9be725f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/utils/Configuration.ts
Expand Up @@ -183,7 +183,7 @@ export class Configuration<D extends IDatabaseDriver = IDatabaseDriver> {
this.options.cache.adapter = NullCacheAdapter;
}

if ('enabled' in this.options.cache) {
if (!('enabled' in this.options.cache)) {
this.options.cache.enabled = this.getMetadataProvider().useCache();
}

Expand Down

0 comments on commit 9be725f

Please sign in to comment.