diff --git a/Server/services/discord.js b/Server/services/discord.js index 2a43625..5eced43 100644 --- a/Server/services/discord.js +++ b/Server/services/discord.js @@ -228,6 +228,10 @@ class DiscordService extends Service { } async cacheCurry(key, func) { + if (process.env.DISABLE_CACHE === 'true') { + return func() + } + if (this.cache.has(key)) { return this.cache.get(key) } diff --git a/Server/services/presentation.js b/Server/services/presentation.js index 0e6674e..e2d0e2a 100644 --- a/Server/services/presentation.js +++ b/Server/services/presentation.js @@ -64,6 +64,10 @@ class PresentationService extends Service { } async cacheCurry(key, func) { + if (process.env.DISABLE_CACHE === 'true') { + return func() + } + if (this.cache.has(key)) { return this.cache.get(key) }