fix(Services): add option to disable caching for development

This commit is contained in:
41666 2020-02-08 00:54:04 -05:00
parent e2d63dc156
commit f5abf34449
No known key found for this signature in database
GPG key ID: BC51D07640DC10AF
2 changed files with 8 additions and 0 deletions

View file

@ -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)
}

View file

@ -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)
}