diff --git a/src/Utils/Placekeeper.js b/src/Utils/Placekeeper.js index a4cf234..1344dd3 100644 --- a/src/Utils/Placekeeper.js +++ b/src/Utils/Placekeeper.js @@ -13,7 +13,7 @@ export default class Placekeeper { #cache = new Map(); #options = new Map([ ['cacheDir', undefined], - ['deactivateCache', false], + ['disableCache', false], ['safeNames', []], ['onError', (err) => {}], ]); @@ -174,7 +174,7 @@ export default class Placekeeper { * @param {string} cacheableRepresentation - The JSON representation of the template parts. */ async store(filePath) { - if(!this.#options.get('cacheDir') || this.#options.get('deactivateCache')) return true; + if(!this.#options.get('cacheDir') || this.#options.get('disableCache')) return true; const key = this.#cleanKey(filePath); await Placekeeper.storage.ensureDir(this.#options.get('cacheDir')); @@ -229,7 +229,7 @@ export default class Placekeeper { */ async load(filePath) { if(typeof(filePath) != 'string') throw new TypeError(`filepath is not a string!`); - if(!this.#options.get('cacheDir') || this.#options.get('deactivateCache')) return null; + if(!this.#options.get('cacheDir') || this.#options.get('disableCache')) return null; const key = this.#cleanKey(filePath); let cacheFilePath = this.buildPath(this.#options.get('cacheDir'), `${key}.json`); @@ -308,7 +308,7 @@ export default class Placekeeper { } const template = this.#cache.get(key); - if(this.#options.get('deactivateCache')) this.#cache.delete(key); + if(this.#options.get('disableCache')) this.#cache.delete(key); if (!template) { throw new Error(`Template with key '${key}' not found in cache.`); }